* [gentoo-commits] gentoo-x86 commit in net-misc/badvpn/files: badvpn-ncd.init badvpn-server.conf badvpn-ncd.conf badvpn-server.init
@ 2012-08-13 10:40 Julian Ospald (hasufell)
0 siblings, 0 replies; 2+ messages in thread
From: Julian Ospald (hasufell) @ 2012-08-13 10:40 UTC (permalink / raw
To: gentoo-commits
hasufell 12/08/13 10:40:21
Added: badvpn-ncd.init badvpn-server.conf badvpn-ncd.conf
badvpn-server.init
Log:
initial commit with Ambroz Bizjak
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Revision Changes Path
1.1 net-misc/badvpn/files/badvpn-ncd.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?rev=1.1&content-type=text/plain
Index: badvpn-ncd.init
===================================================================
#!/sbin/runscript
# 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"}
depend() {
need net
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[@]}"
--logger syslog
--syslog-ident "$NCD_SYSLOG_IDENT"
)
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}"
}
1.1 net-misc/badvpn/files/badvpn-server.conf
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.conf?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.conf?rev=1.1&content-type=text/plain
Index: badvpn-server.conf
===================================================================
# Name to print when starting/stopping, in case of multiple servers.
#VPN_NAME="BadVPN server"
# User account to run server as.
VPN_USER="badvpn"
# Syslog identification. Use "none" to disable syslog.
#VPN_SYSLOG_IDENT="badvpn-server"
# Arguments to badvpn-server.
VPN_ARGS=(
--listen-addr 0.0.0.0:7179
)
1.1 net-misc/badvpn/files/badvpn-ncd.conf
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.conf?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.conf?rev=1.1&content-type=text/plain
Index: badvpn-ncd.conf
===================================================================
# NCD program file.
NCD_CONFIG="/etc/ncd.conf"
# Syslog identification. Use "none" to disable syslog.
#VPN_SYSLOG_IDENT="ncd"
# Additional arguments.
#NCD_ARGS=()
1.1 net-misc/badvpn/files/badvpn-server.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?rev=1.1&content-type=text/plain
Index: badvpn-server.init
===================================================================
#!/sbin/runscript
# 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"}
depend() {
need net
}
start() {
ebegin "Starting $VPN_NAME"
local args=("${VPN_ARGS[@]}")
if [ "$VPN_SYSLOG_IDENT" != "none" ]; then
args=(
"${args[@]}"
--logger syslog
--syslog-ident "$VPN_SYSLOG_IDENT"
)
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"
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in net-misc/badvpn/files: badvpn-ncd.init badvpn-server.conf badvpn-ncd.conf badvpn-server.init
@ 2012-08-19 13:23 Julian Ospald (hasufell)
0 siblings, 0 replies; 2+ messages in thread
From: Julian Ospald (hasufell) @ 2012-08-19 13:23 UTC (permalink / raw
To: gentoo-commits
hasufell 12/08/19 13:23:21
Modified: badvpn-ncd.init badvpn-server.conf badvpn-ncd.conf
badvpn-server.init
Log:
make init scripts posix compliant wrt #431792
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Revision Changes Path
1.2 net-misc/badvpn/files/badvpn-ncd.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?r1=1.1&r2=1.2
Index: badvpn-ncd.init
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- badvpn-ncd.init 13 Aug 2012 10:40:21 -0000 1.1
+++ badvpn-ncd.init 19 Aug 2012 13:23:21 -0000 1.2
@@ -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}"
}
1.2 net-misc/badvpn/files/badvpn-server.conf
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.conf?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.conf?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.conf?r1=1.1&r2=1.2
Index: badvpn-server.conf
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/badvpn/files/badvpn-server.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- badvpn-server.conf 13 Aug 2012 10:40:21 -0000 1.1
+++ badvpn-server.conf 19 Aug 2012 13:23:21 -0000 1.2
@@ -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"
1.2 net-misc/badvpn/files/badvpn-ncd.conf
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.conf?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.conf?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.conf?r1=1.1&r2=1.2
Index: badvpn-ncd.conf
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- badvpn-ncd.conf 13 Aug 2012 10:40:21 -0000 1.1
+++ badvpn-ncd.conf 19 Aug 2012 13:23:21 -0000 1.2
@@ -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=""
1.2 net-misc/badvpn/files/badvpn-server.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?r1=1.1&r2=1.2
Index: badvpn-server.init
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/badvpn/files/badvpn-server.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- badvpn-server.init 13 Aug 2012 10:40:21 -0000 1.1
+++ badvpn-server.init 19 Aug 2012 13:23:21 -0000 1.2
@@ -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"
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-19 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-19 13:23 [gentoo-commits] gentoo-x86 commit in net-misc/badvpn/files: badvpn-ncd.init badvpn-server.conf badvpn-ncd.conf badvpn-server.init Julian Ospald (hasufell)
-- strict thread matches above, loose matches on Subject: below --
2012-08-13 10:40 Julian Ospald (hasufell)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox