summaryrefslogtreecommitdiff
path: root/community/leafnode/leafnode.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/leafnode/leafnode.install')
-rw-r--r--community/leafnode/leafnode.install11
1 files changed, 3 insertions, 8 deletions
diff --git a/community/leafnode/leafnode.install b/community/leafnode/leafnode.install
index eb942009e..f1a046e1c 100644
--- a/community/leafnode/leafnode.install
+++ b/community/leafnode/leafnode.install
@@ -1,10 +1,8 @@
post_install() {
echo "-- Adding user 'news' and group 'news', chowning /var/spool/news"
- groupadd -K GID_MIN=5000 news &>/dev/null
- gid=`cat /etc/group | grep news | cut -d: -f 3`
- useradd -u $gid -g news -d /var/spool/news -s /bin/false news &>/dev/null
+ grep -e "^news:" /etc/group 2>&- >&- || groupadd -g 13 -r news 2>&- >&-
+ grep -e "^news:" /etc/passwd 2>&- >&- || useradd -u 9 -r -m -g news news 2>&- >&-
chown -R root:news etc/leafnode
-
# create dir if necessary
if [ ! -d var/spool/news ]; then
install -d -m 770 -o news -g news var/spool/news
@@ -12,9 +10,6 @@ post_install() {
}
post_remove() {
- echo "-- Removing user 'news' and group 'news', deleting spool directory"
- userdel news &>/dev/null
- groupdel news &>/dev/null
+ echo "-- Deleting spool directory"
rm -rf var/spool/news
}
-