summaryrefslogtreecommitdiff
path: root/debian/vyatta-cfg.preinst
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-20 18:13:39 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-20 18:13:39 -0800
commitd399ed4b15f3b2f146be93ebacafb689f2359c9f (patch)
tree0b84f1b936d9e9120ee416c1955b5009cda516f3 /debian/vyatta-cfg.preinst
parentc5619afaa8155a70e4d7f9e3ea7310f5341431df (diff)
downloadvyatta-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.
Diffstat (limited to 'debian/vyatta-cfg.preinst')
-rw-r--r--debian/vyatta-cfg.preinst14
1 files changed, 14 insertions, 0 deletions
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