From d399ed4b15f3b2f146be93ebacafb689f2359c9f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 20 Dec 2009 18:13:39 -0800 Subject: Setup vyatta groups in early stage of install If other packages want to refer to vyatta groups, need to be done early in install. --- debian/vyatta-cfg.postinst.in | 6 ------ debian/vyatta-cfg.preinst | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 debian/vyatta-cfg.preinst (limited to 'debian') 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 -- cgit v1.2.3