diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-20 18:13:39 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-20 18:13:39 -0800 |
commit | d399ed4b15f3b2f146be93ebacafb689f2359c9f (patch) | |
tree | 0b84f1b936d9e9120ee416c1955b5009cda516f3 | |
parent | c5619afaa8155a70e4d7f9e3ea7310f5341431df (diff) | |
download | vyatta-cfg-d399ed4b15f3b2f146be93ebacafb689f2359c9f.tar.gz vyatta-cfg-d399ed4b15f3b2f146be93ebacafb689f2359c9f.zip |
Setup vyatta groups in early stage of install
If other packages want to refer to vyatta groups, need to be done
early in install.
-rw-r--r-- | debian/vyatta-cfg.postinst.in | 6 | ||||
-rw-r--r-- | debian/vyatta-cfg.preinst | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in index 9237df4..59b26bf 100644 --- a/debian/vyatta-cfg.postinst.in +++ b/debian/vyatta-cfg.postinst.in @@ -19,9 +19,3 @@ if [ "$sysconfdir" != "/etc" ]; then fi mv /opt/vyatta/share/vyatta-cfg/templates/priority /opt/vyatta/share/vyatta-cfg/. -# add group for configuration, if not already present: -grep '^vyattacfg:' /etc/group >&/dev/null || - addgroup --system vyattacfg -grep '^vyattaop:' /etc/group >&/dev/null || - addgroup --system vyattaop - diff --git a/debian/vyatta-cfg.preinst b/debian/vyatta-cfg.preinst new file mode 100644 index 0000000..ffdee1b --- /dev/null +++ b/debian/vyatta-cfg.preinst @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} +set -e +set -u + +# add groups for vyatta accounts +if ! getent group vyattacfg >/dev/null; then + addgroup --system vyattacfg +fi +if ! getent group vyattaop >/dev/null; then + addgroup --system vyattaop +fi |