diff options
author | Julian Ospald <hasufell@gentoo.org> | 2012-08-19 13:23:22 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2012-08-19 13:23:22 +0000 |
commit | 4ebebf5b8cd7271e3ef9163444823e0c464fa7b3 (patch) | |
tree | 8ec044fe7db70dec03f029e34fc9d7158ba91cce /net-misc | |
parent | Stable on ppc wrt bug#431904. (diff) | |
download | gentoo-2-4ebebf5b8cd7271e3ef9163444823e0c464fa7b3.tar.gz gentoo-2-4ebebf5b8cd7271e3ef9163444823e0c464fa7b3.tar.bz2 gentoo-2-4ebebf5b8cd7271e3ef9163444823e0c464fa7b3.zip |
make init scripts posix compliant wrt #431792
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/badvpn/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/badvpn/badvpn-1.999.123-r1.ebuild (renamed from net-misc/badvpn/badvpn-1.999.123.ebuild) | 2 | ||||
-rw-r--r-- | net-misc/badvpn/files/badvpn-ncd.conf | 11 | ||||
-rw-r--r-- | net-misc/badvpn/files/badvpn-ncd.init | 47 | ||||
-rw-r--r-- | net-misc/badvpn/files/badvpn-server.conf | 16 | ||||
-rw-r--r-- | net-misc/badvpn/files/badvpn-server.init | 44 |
6 files changed, 45 insertions, 84 deletions
diff --git a/net-misc/badvpn/ChangeLog b/net-misc/badvpn/ChangeLog index 40ed16f2b46d..f76c83722e28 100644 --- a/net-misc/badvpn/ChangeLog +++ b/net-misc/badvpn/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/badvpn # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/badvpn/ChangeLog,v 1.1 2012/08/13 10:40:22 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/badvpn/ChangeLog,v 1.2 2012/08/19 13:23:21 hasufell Exp $ + +*badvpn-1.999.123-r1 (19 Aug 2012) + + 19 Aug 2012; Julian Ospald <hasufell@gentoo.org> -badvpn-1.999.123.ebuild, + +badvpn-1.999.123-r1.ebuild, files/badvpn-ncd.conf, files/badvpn-ncd.init, + files/badvpn-server.conf, files/badvpn-server.init: + make init scripts posix compliant wrt #431792 *badvpn-1.999.123 (13 Aug 2012) diff --git a/net-misc/badvpn/badvpn-1.999.123.ebuild b/net-misc/badvpn/badvpn-1.999.123-r1.ebuild index 2b45dc10fc16..43fbc0bbea1b 100644 --- a/net-misc/badvpn/badvpn-1.999.123.ebuild +++ b/net-misc/badvpn/badvpn-1.999.123-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/badvpn/badvpn-1.999.123.ebuild,v 1.1 2012/08/13 10:40:22 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/badvpn/badvpn-1.999.123-r1.ebuild,v 1.1 2012/08/19 13:23:21 hasufell Exp $ EAPI=4 inherit eutils cmake-utils user diff --git a/net-misc/badvpn/files/badvpn-ncd.conf b/net-misc/badvpn/files/badvpn-ncd.conf index fd553e6a9b83..ad34c66f7ca3 100644 --- a/net-misc/badvpn/files/badvpn-ncd.conf +++ b/net-misc/badvpn/files/badvpn-ncd.conf @@ -1,8 +1,11 @@ # NCD program file. -NCD_CONFIG="/etc/ncd.conf" +#ncd_config="/etc/ncd.conf" -# Syslog identification. Use "none" to disable syslog. -#VPN_SYSLOG_IDENT="ncd" +# enable or disable syslog. +#ncd_syslog="NO" + +# Syslog identification. +#ncd_syslog_ident="ncd" # Additional arguments. -#NCD_ARGS=() +#ncd_args="" diff --git a/net-misc/badvpn/files/badvpn-ncd.init b/net-misc/badvpn/files/badvpn-ncd.init index 6714faf91992..dba4c9af56d8 100644 --- a/net-misc/badvpn/files/badvpn-ncd.init +++ b/net-misc/badvpn/files/badvpn-ncd.init @@ -2,49 +2,22 @@ # Copyright 1999-2012 Gentoo Foundation # Released under the 3-clause BSD license. -NCD_PIDFILE="/var/run/${SVCNAME}.pid" -NCD_NAME=${NCD_NAME:-"Network Configuration Daemon"} -NCD_SYSLOG_IDENT=${NCD_SYSLOG_IDENT:-"ncd"} -NCD_EXEC=${NCD_EXEC:-"/usr/bin/badvpn-ncd"} +command="${ncd_exec:-"/usr/bin/badvpn-ncd"}" +command_args="${ncd_args} --config-file ${ncd_config:-/etc/ncd.conf}" +command_background="YES" +description="Network Configuration Daemon" +pidfile="/var/run/${RC_SVCNAME}.pid" depend() { - need net + need localmount after bootmisc before netmount } -start() { - ebegin "Starting ${NCD_NAME}" - - local args=( - "${NCD_ARGS[@]}" - --config-file - "${NCD_CONFIG}" - ) - if [ "$NCD_SYSLOG_IDENT" != "none" ]; then - args=( - "${args[@]}" +start_pre() { + if yesno "${ncd_syslog:-NO}"; then + command_args="${command_args} --logger syslog - --syslog-ident "$NCD_SYSLOG_IDENT" - ) + --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\"" fi - - start-stop-daemon \ - --start \ - --pidfile "${NCD_PIDFILE}" \ - --background \ - --make-pidfile \ - --exec "${NCD_EXEC}" -- "${args[@]}" - - eend $? "Failed to start ${NCD_NAME}" -} - -stop() { - ebegin "Stopping ${NCD_NAME}" - - start-stop-daemon \ - --stop \ - --pidfile "${NCD_PIDFILE}" - - eend $? "Failed to stop ${NCD_NAME}" } diff --git a/net-misc/badvpn/files/badvpn-server.conf b/net-misc/badvpn/files/badvpn-server.conf index 6d2750a55826..ed5103d3d0ef 100644 --- a/net-misc/badvpn/files/badvpn-server.conf +++ b/net-misc/badvpn/files/badvpn-server.conf @@ -1,13 +1,11 @@ -# Name to print when starting/stopping, in case of multiple servers. -#VPN_NAME="BadVPN server" - # User account to run server as. -VPN_USER="badvpn" +#vpn_user="badvpn" + +# Enable or disable syslog. +#vpn_syslog="NO" -# Syslog identification. Use "none" to disable syslog. -#VPN_SYSLOG_IDENT="badvpn-server" +# Syslog identification. +#vpn_syslog_ident="badvpn-server" # Arguments to badvpn-server. -VPN_ARGS=( - --listen-addr 0.0.0.0:7179 -) +vpn_args="--listen-addr 0.0.0.0:7179" diff --git a/net-misc/badvpn/files/badvpn-server.init b/net-misc/badvpn/files/badvpn-server.init index fc1a1d981279..2af1db36c5ce 100644 --- a/net-misc/badvpn/files/badvpn-server.init +++ b/net-misc/badvpn/files/badvpn-server.init @@ -2,42 +2,22 @@ # Copyright 1999-2012 Gentoo Foundation # Released under the 3-clause BSD license. -VPN_PIDFILE="/var/run/${SVCNAME}.pid" -VPN_NAME=${VPN_NAME:-"BadVPN server"} -VPN_SYSLOG_IDENT=${VPN_SYSLOG_IDENT:-"badvpn-server"} -VPN_EXEC=${VPN_EXEC:-"/usr/bin/badvpn-server"} +command="${vpn_exec:-/usr/bin/badvpn-server}" +command_args="${vpn_args}" +command_background="YES" +description="BadVPN server" +pidfile="/var/run/${RC_SVCNAME}.pid" +start_stop_daemon_args="--user \"${vpn_user:-badvpn}\"" depend() { - need net + need localmount + after bootmisc } -start() { - ebegin "Starting $VPN_NAME" - local args=("${VPN_ARGS[@]}") - if [ "$VPN_SYSLOG_IDENT" != "none" ]; then - args=( - "${args[@]}" +start_pre() { + if yesno "${vpn_syslog:-NO}"; then + command_args="${command_args} --logger syslog - --syslog-ident "$VPN_SYSLOG_IDENT" - ) + --syslog-ident \"${vpn_syslog_ident:-${RC_SVCNAME}}\"" fi - start-stop-daemon \ - --start \ - --pidfile "${VPN_PIDFILE}" \ - --background \ - --make-pidfile \ - --user "${VPN_USER}" \ - --exec "${VPN_EXEC}" -- "${args[@]}" - - eend $? "Failed to start $VPN_NAME" -} - -stop() { - ebegin "Stopping $VPN_NAME" - - start-stop-daemon \ - --stop \ - --pidfile $VPN_PIDFILE - - eend $? "Failed to stop $VPN_NAME" } |