diff options
author | Eray Aslan <eras@gentoo.org> | 2011-06-15 15:24:06 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2011-06-15 15:24:06 +0000 |
commit | 8745f2e79fe1fac2ba73abbc172e5fd2dc09c34a (patch) | |
tree | 60533072f500aceb5771ed75a3868fca931a7107 /net-mail/perdition/files | |
parent | Stable for HPPA (bug #371671). (diff) | |
download | gentoo-2-8745f2e79fe1fac2ba73abbc172e5fd2dc09c34a.tar.gz gentoo-2-8745f2e79fe1fac2ba73abbc172e5fd2dc09c34a.tar.bz2 gentoo-2-8745f2e79fe1fac2ba73abbc172e5fd2dc09c34a.zip |
Fix pid dir creation in init script.
(Portage version: 2.1.10.3/cvs/Linux x86_64)
Diffstat (limited to 'net-mail/perdition/files')
-rwxr-xr-x | net-mail/perdition/files/perdition.initd | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net-mail/perdition/files/perdition.initd b/net-mail/perdition/files/perdition.initd index cb7f680d5ae7..397ed4775156 100755 --- a/net-mail/perdition/files/perdition.initd +++ b/net-mail/perdition/files/perdition.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.initd,v 1.2 2008/06/10 18:28:27 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.initd,v 1.3 2011/06/15 15:24:06 eras Exp $ depend() { need net @@ -16,7 +16,16 @@ check_key() { fi } +checkconfig() { + # create PIDDIR (usually /var/run/perdition) if necessary + if [ ! -d "${PIDDIR:-/var/run/perdition}" ] ; then + checkpath -q -d -o ${PERDITION_USER:-perdition}:${PERDITION_USER:-perdition} \ + -m 0775 "${PIDDIR:-/var/run/perdition}" || return 1 + fi +} + start() { + checkconfig || return 1 if [ "${POP3}" = "yes" ]; then ebegin "Starting perdition services (POP3)" start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3 -p ${PIDDIR}/pop3.pid \ |