summaryrefslogtreecommitdiff
path: root/debian/strongswan-starter.postinst
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-05-25 19:27:30 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-05-25 19:27:30 +0000
commit7bd71d9bc6d6a321797350bde751887383d6ca83 (patch)
treed7db48594e27dcaccedc2811babe2d4f149cfb6c /debian/strongswan-starter.postinst
parent4e55071879aae604b7b61c93dc815a357571cd88 (diff)
downloadvyos-strongswan-7bd71d9bc6d6a321797350bde751887383d6ca83.tar.gz
vyos-strongswan-7bd71d9bc6d6a321797350bde751887383d6ca83.zip
- Call adduser in postinst and deluser in postrm to manage "strongswan" user.
- Enable switching to this user. - Build some more plugins.
Diffstat (limited to 'debian/strongswan-starter.postinst')
-rw-r--r--debian/strongswan-starter.postinst9
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/strongswan-starter.postinst b/debian/strongswan-starter.postinst
index 98de3493c..52e895a88 100644
--- a/debian/strongswan-starter.postinst
+++ b/debian/strongswan-starter.postinst
@@ -119,6 +119,12 @@ disable_daemon_start() {
fi
}
+setup_strongswan_user() {
+ if ! getent passwd strongswan >/dev/null; then
+ adduser --quiet --system --no-create-home --home /var/lib/strongswan --shell /usr/sbin/nologin strongswan
+ fi
+}
+
. /usr/share/debconf/confmodule
case "$1" in
@@ -285,6 +291,9 @@ EOF
# disable_daemon_start "charon" "IKEv2"
#fi
+ # create user for strongswan to change its uid into
+ setup_strongswan_user
+
if [ -z "$2" ]; then
# no old configured version - start strongswan now
invoke-rc.d ipsec start || true