[ngircd] Fix up for tmpfs /var/run Remove fedora-usermgmt stuff Fix username in config file to match up.
Kevin Fenzi
kevin at fedoraproject.org
Sun Jan 23 21:14:56 UTC 2011
commit 8ac106fc56815fef4d10b3f8269f6980f4187dd7
Author: Kevin Fenzi <kevin at tummy.com>
Date: Sun Jan 23 14:14:39 2011 -0700
Fix up for tmpfs /var/run
Remove fedora-usermgmt stuff
Fix username in config file to match up.
ngircd.conf | 4 ++--
ngircd.init | 5 ++++-
ngircd.spec | 27 ++++++++++++---------------
3 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/ngircd.conf b/ngircd.conf
index bb30a0c..a6dcb92 100644
--- a/ngircd.conf
+++ b/ngircd.conf
@@ -59,12 +59,12 @@ a# $Id$
# server must have been started with root privileges! In addition,
# the configuration and MOTD files must be readable by this user,
# otherwise RESTART and REHASH won't work!
- ServerUID = ngirc
+ ServerUID = ngircd
# Group ID under which the ngircd should run; you can use the name
# of the group or the numerical ID. ATTENTION: For this to work the
# server must have been started with root privileges!
- ServerGID = ngirc
+ ServerGID = ngircd
# A directory to chroot in when everything is initialized. It
# doesn't need to be populated if ngIRCd is compiled as a static
diff --git a/ngircd.init b/ngircd.init
index 93c54c3..69a5b3f 100755
--- a/ngircd.init
+++ b/ngircd.init
@@ -6,7 +6,7 @@
# chkconfig: - 80 30
# description: ngircd is an IRC daemon
# processname: ngircd
-# pidfile: /var/run/ngircd.pid
+# pidfile: /var/run/ngircd/ngircd.pid
### BEGIN INIT INFO
# Provides: ngircd
# Required-Start: $local_fs $network
@@ -21,6 +21,9 @@
prog=ngircd
RETVAL=0
+mkdir -p /var/run/ngircd 2>/dev/null
+chown ngircd /var/run/ngircd
+
start() {
echo -n $"Starting $prog: "
daemon ngircd
diff --git a/ngircd.spec b/ngircd.spec
index 794a253..6de6d21 100644
--- a/ngircd.spec
+++ b/ngircd.spec
@@ -1,11 +1,6 @@
-%define uid 36
-%define username ngircd
-%define homedir /tmp
-%define gecos "Next Generation IRC Daemon"
-
Name: ngircd
Version: 17.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Next Generation IRC Daemon
Group: System Environment/Daemons
License: GPLv2+
@@ -21,9 +16,7 @@ Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
-Requires(pre): fedora-usermgmt
-Requires(postun): fedora-usermgmt
-
+Requires(pre): shadow-utils
%description
ngIRCd is a free open source daemon for Internet Relay Chat (IRC),
@@ -60,9 +53,11 @@ mkdir -p %{buildroot}%{_localstatedir}/run/ngircd
rm -rf %{buildroot}
%pre
-/usr/sbin/fedora-groupadd %uid -r %username &>/dev/null || :
-/usr/sbin/fedora-useradd %uid -r -s /sbin/nologin -d %homedir -M \
- -c '%gecos' -g %username %username &>/dev/null || :
+getent group ngircd >/dev/null || groupadd -r ngircd
+getent passwd ngircd >/dev/null || \
+ useradd -r -g ngircd -d /tmp/ -s /sbin/nologin \
+ -c "Next Generation IRC Daemon" ngircd
+exit 0
%post
# This adds the proper /etc/rc*.d links for the script
@@ -78,9 +73,6 @@ fi
if [ "$1" -ge "1" ]; then
/sbin/service ngircd condrestart >/dev/null 2>&1 || :
fi
-test "$1" != 0 || /usr/sbin/fedora-userdel %username &>/dev/null || :
-test "$1" != 0 || /usr/sbin/fedora-groupdel %username &>/dev/null || :
-
%files
%defattr(-,root,root,-)
@@ -95,6 +87,11 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %username &>/dev/null || :
%changelog
+* Sun Jan 23 2011 Kevin Fenzi <kevin at tummy.com> - 17.1-2
+- Fix up for tmpfs /var/run
+- Remove fedora-usermgmt stuff
+- Fix username in config file to match up.
+
* Tue Dec 21 2010 Kevin Fenzi <kevin at tummy.com> - 17.1-1
- Update to 17.1
More information about the scm-commits
mailing list