diff options
author | flz <flz@FreeBSD.org> | 2006-03-20 18:41:04 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2006-03-20 18:41:04 +0800 |
commit | fa08626507ca5d8d747f5f02964a30d7d35f1fc4 (patch) | |
tree | 0ce59088cda6e2ccf4b91f6d5b12542ae9f1fe35 /net/openospfd-devel/pkg-install | |
parent | 5207f2921ea6aaeea438d034215f70c83f8c65fa (diff) | |
download | freebsd-ports-graphics-fa08626507ca5d8d747f5f02964a30d7d35f1fc4.tar.gz freebsd-ports-graphics-fa08626507ca5d8d747f5f02964a30d7d35f1fc4.tar.zst freebsd-ports-graphics-fa08626507ca5d8d747f5f02964a30d7d35f1fc4.zip |
- Add openospfd-devel, a free implementation of the Open Shortest Path First
routing protocol.
Diffstat (limited to 'net/openospfd-devel/pkg-install')
-rw-r--r-- | net/openospfd-devel/pkg-install | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net/openospfd-devel/pkg-install b/net/openospfd-devel/pkg-install new file mode 100644 index 00000000000..dda8b52eb6f --- /dev/null +++ b/net/openospfd-devel/pkg-install @@ -0,0 +1,36 @@ +#!/bin/sh + +case $2 in +POST-INSTALL) + USER=_ospfd + GROUP=${USER} + UID=131 + GID=${UID} + PW=/usr/sbin/pw + + if ${PW} group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if ${PW} groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if ${PW} user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d "/var/empty" -s /sbin/nologin -c "OSPF Daemon" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + exit 0 + ;; +esac |