| # summary of how this script can be called: |
| # * <new-preinst> `install' |
| # * <new-preinst> `install' <old-version> |
| # * <new-preinst> `upgrade' <old-version> |
| # * <old-preinst> `abort-upgrade' <new-version> |
| # for details, see http://www.debian.org/doc/debian-policy/ or |
| # the debian-policy package |
| # Now we have to ensure the following state: |
| # /etc/passwd: ndns:x:YYY:ZZZ:NDNS User:/nonexistent:/bin/false |
| # /etc/group: ndns:x:ZZZ: |
| # Sadly there could any state be present on the system so we have to |
| # modify everything carefully i.e. not doing a chown before creating |
| # creating ndns group if he isn't already there |
| if ! getent group ndns >/dev/null; then |
| # Adding system group: ndns. |
| addgroup --system ndns >/dev/null |
| # creating ndns user if he isn't already there |
| if ! getent passwd ndns >/dev/null; then |
| # Adding system user: ndns. |
| echo "preinst called with unknown argument \`$1'" >&2 |
| # dh_installdeb will replace this with shell code automatically |
| # generated by other debhelper scripts. |