diff options
author | Brian Evans <grknight@gentoo.org> | 2021-12-03 10:30:54 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2021-12-03 10:30:54 -0500 |
commit | 33c2ef480fe82a521108da3276ca2f7a160e547a (patch) | |
tree | 8cea232e814f0ddc64714edc4f185549461245c2 /net-misc/ser2net | |
parent | dev-util/idea-community: QA clean-ups (diff) | |
download | gentoo-33c2ef480fe82a521108da3276ca2f7a160e547a.tar.gz gentoo-33c2ef480fe82a521108da3276ca2f7a160e547a.tar.bz2 gentoo-33c2ef480fe82a521108da3276ca2f7a160e547a.zip |
net-misc/ser2net: Update OpenRC script
Non-maintainer commit: This is effectively the same options reorganized
for future consideration.
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'net-misc/ser2net')
-rw-r--r-- | net-misc/ser2net/files/ser2net.initd | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/net-misc/ser2net/files/ser2net.initd b/net-misc/ser2net/files/ser2net.initd index 3ce489bd1ff1..7652bc9b0350 100644 --- a/net-misc/ser2net/files/ser2net.initd +++ b/net-misc/ser2net/files/ser2net.initd @@ -1,22 +1,24 @@ #!/sbin/openrc-run -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2021 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 description="Serial to network proxy (${RC_SVCNAME#*.})" pidfile="/var/run/${RC_SVCNAME}.pid" command="/usr/sbin/ser2net" -name="${RC_SVCNAME}" +name="${description}" extra_started_commands="reload" description_reload="Reread configuration file and make the appropriate changes" -start_stop_daemon_args="--quiet --exec ${command} --name ${name} --pidfile ${pidfile}" +start_stop_daemon_args="--quiet" +command_args_background="-P ${pidfile}" +command_args_foreground="-n" depend() { use logger need net } -config_check() { +start_pre() { command_args="${EXTRA_OPTS}" CONFIG_FILE_DEFAULT="/etc/ser2net.conf" @@ -34,21 +36,8 @@ config_check() { return 0 } -start() { - config_check || return ${?} - ebegin "Starting ${description}" - start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args} -P "${pidfile}" - eend ${?} -} - -stop() { - ebegin "Stopping ${description}" - start-stop-daemon --stop ${start_stop_daemon_args} - eend ${?} -} - reload() { ebegin "Reloading ${description}" - start-stop-daemon --signal HUP ${start_stop_daemon_args} + start-stop-daemon --signal HUP --pidfile "${pidfile}" eend ${?} } |