diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2010-05-25 19:27:30 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2010-05-25 19:27:30 +0000 |
commit | 7bd71d9bc6d6a321797350bde751887383d6ca83 (patch) | |
tree | d7db48594e27dcaccedc2811babe2d4f149cfb6c /debian/strongswan-starter.postinst | |
parent | 4e55071879aae604b7b61c93dc815a357571cd88 (diff) | |
download | vyos-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.postinst | 9 |
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 |