summaryrefslogtreecommitdiff
path: root/pcr/openrc-net/wicd.initd
diff options
context:
space:
mode:
authorfreaj <freaj@riseup.net>2015-03-30 10:08:17 +0200
committerfreaj <freaj@riseup.net>2015-03-30 10:08:17 +0200
commit41c9dc8729840f45f174a14a08703e04d1f5717e (patch)
treefeddfb083b443556f04bac84c6519d356e061854 /pcr/openrc-net/wicd.initd
parent7f0385668a7eb0caf6a74f13d10c1fda5c7ad86d (diff)
downloadabslibre-41c9dc8729840f45f174a14a08703e04d1f5717e.tar.gz
abslibre-41c9dc8729840f45f174a14a08703e04d1f5717e.tar.bz2
abslibre-41c9dc8729840f45f174a14a08703e04d1f5717e.zip
openrc-net: add new package to [pcr]
Diffstat (limited to 'pcr/openrc-net/wicd.initd')
-rwxr-xr-xpcr/openrc-net/wicd.initd41
1 files changed, 41 insertions, 0 deletions
diff --git a/pcr/openrc-net/wicd.initd b/pcr/openrc-net/wicd.initd
new file mode 100755
index 000000000..70123946c
--- /dev/null
+++ b/pcr/openrc-net/wicd.initd
@@ -0,0 +1,41 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# opts="start stop restart"
+
+WICD_DAEMON=/usr/bin/wicd
+WICD_PIDFILE=/run/wicd/wicd.pid
+
+depend() {
+ need dbus
+ after hald
+ provide net
+}
+
+start() {
+ ebegin "Starting wicd daemon"
+ # fix Gentoo bug 296197
+ #[ -f /etc/wicd/wired-settings.conf ] && sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
+ "${WICD_DAEMON}" >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wicd daemon and closing connections"
+ # can't use ssd because it needs the -k option
+ "${WICD_DAEMON}" -k >/dev/null 2>&1
+ eend $?
+}
+
+force_kill() {
+ ebegin "Stopping wicd daemon"
+ start-stop-daemon --stop --pidfile "${WICD_PIDFILE}"
+ eend $?
+}
+
+restart() {
+ force_kill
+ #start
+ sve_start
+}