diff options
author | Stefan Briesenick <sbriesen@gentoo.org> | 2012-07-17 19:50:15 +0000 |
---|---|---|
committer | Stefan Briesenick <sbriesen@gentoo.org> | 2012-07-17 19:50:15 +0000 |
commit | 7dfce41c127a1c555fd5f95b254fbf760e099561 (patch) | |
tree | d7582f5af792016cc79119a6dd5eb4b12c43e9a9 /net-misc/termpkg/files | |
parent | EAPI=4, added 230400 baud patch, reworked init-script. (diff) | |
download | gentoo-2-7dfce41c127a1c555fd5f95b254fbf760e099561.tar.gz gentoo-2-7dfce41c127a1c555fd5f95b254fbf760e099561.tar.bz2 gentoo-2-7dfce41c127a1c555fd5f95b254fbf760e099561.zip |
EAPI=4, reworked init-scripts.
(Portage version: 2.2.0_alpha118/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/termpkg/files')
-rw-r--r-- | net-misc/termpkg/files/termnetd.initd | 18 | ||||
-rw-r--r-- | net-misc/termpkg/files/ttyd.initd | 14 |
2 files changed, 17 insertions, 15 deletions
diff --git a/net-misc/termpkg/files/termnetd.initd b/net-misc/termpkg/files/termnetd.initd index 73d095c8717b..db8621496cfe 100644 --- a/net-misc/termpkg/files/termnetd.initd +++ b/net-misc/termpkg/files/termnetd.initd @@ -1,13 +1,15 @@ #!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/termpkg/files/termnetd.initd,v 1.1 2008/09/23 19:34:00 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/termpkg/files/termnetd.initd,v 1.2 2012/07/17 19:50:15 sbriesen Exp $ description="Terminal Server daemon (${RC_SVCNAME#*.})" -description_reload="Reread configuration file and make the appropriate changes" -extra_started_commands="reload" command="/usr/sbin/termnetd" -name="termnetd" +name="${RC_SVCNAME}" + +extra_started_commands="reload" +description_reload="Reread configuration file and make the appropriate changes" +start_stop_daemon_args="--quiet --exec ${command} --name ${name}" depend() { use logger @@ -33,18 +35,18 @@ config_check() { start() { config_check || return ${?} ebegin "Starting ${description}" - start-stop-daemon --start --quiet --exec "${command}" -- ${command_args} + start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args} eend ${?} } stop() { ebegin "Stopping ${description}" - start-stop-daemon --stop --quiet --oknodo --exec "${command}" --name "${name}" + start-stop-daemon --stop ${start_stop_daemon_args} eend ${?} } reload() { ebegin "Reloading ${description}" - start-stop-daemon --stop --signal HUP --oknodo --exec "${command}" --name "${name}" + start-stop-daemon --signal HUP ${start_stop_daemon_args} eend ${?} } diff --git a/net-misc/termpkg/files/ttyd.initd b/net-misc/termpkg/files/ttyd.initd index 3302ea37bc9b..7149a34b4460 100644 --- a/net-misc/termpkg/files/ttyd.initd +++ b/net-misc/termpkg/files/ttyd.initd @@ -1,10 +1,13 @@ #!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/termpkg/files/ttyd.initd,v 1.1 2008/09/23 19:34:00 sbriesen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/termpkg/files/ttyd.initd,v 1.2 2012/07/17 19:50:15 sbriesen Exp $ description="Remote Modem Utility (${RC_SVCNAME#*.})" command="/usr/sbin/ttyd" +name="${RC_SVCNAME}" + +start_stop_daemon_args="--quiet --exec ${command} --name ${name}" depend() { use logger @@ -74,7 +77,7 @@ start() { config_check || return ${?} device_check || return ${?} ebegin "Starting ${description}" - start-stop-daemon --start --quiet --exec "${command}" -- ${command_args} + start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args} if eend ${?}; then setup_perms setup_links @@ -84,11 +87,8 @@ start() { stop() { config_check || return ${?} - # we can't use start-stop-daemon, because we don't have a pidfile - # *and* multiple processes can run at the same time. So we use - # pkill to identify *our* process via commandline args. ebegin "Stopping ${description}" - /usr/bin/pkill -f "^${command} -d ${DEV_PTY} " + start-stop-daemon --stop ${start_stop_daemon_args} eend ${?} unset_links unset_perms |