2006-03-27 Dan Williams <dcbw@redhat.com>
Patch from Tor Krill <bugzilla@krill.nu> * configure.in initscript/Makefile.am src/backends/Makefile.am src/backends/NetworkManagerArch.c initscript/Arch/Makefile.am initscript/Arch/networkmanager-dispatcher.in initscript/Arch/networkmanager.in - Add Arch Linux support, fixes gnome.org #335147 git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1649 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
4
initscript/Arch/Makefile.am
Normal file
4
initscript/Arch/Makefile.am
Normal file
@@ -0,0 +1,4 @@
|
||||
EXTRA_DIST = networkmanager networkmanager-dispatcher
|
||||
|
||||
initddir = $(sysconfdir)/rc.d
|
||||
initd_SCRIPTS = networkmanager networkmanager-dispatcher
|
54
initscript/Arch/networkmanager-dispatcher.in
Normal file
54
initscript/Arch/networkmanager-dispatcher.in
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@prefix@
|
||||
sbindir=@sbindir@
|
||||
NETWORKMANAGER_BIN=${sbindir}/NetworkManagerDispatcher
|
||||
|
||||
# general config
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
# Sanity checks.
|
||||
[ -x $NETWORKMANAGER_BIN ] || exit 0
|
||||
|
||||
# We need /usr/sbin/ip
|
||||
[ -x /usr/sbin/ip ] || exit 0
|
||||
|
||||
PID=`pidof -o %PPID $NETWORKMANAGER_BIN`
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting NetworkManagerDispatcher"
|
||||
if [ -z "$PID" ]; then
|
||||
$NETWORKMANAGER_BIN
|
||||
fi
|
||||
if [ ! -z "$PID" -o $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon NetworkManagerDispatcher
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping NetworkManagerDispatcher"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon NetworkManagerDispatcher
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
|
||||
|
||||
|
55
initscript/Arch/networkmanager.in
Normal file
55
initscript/Arch/networkmanager.in
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@prefix@
|
||||
sbindir=@sbindir@
|
||||
|
||||
NETWORKMANAGER_BIN=${sbindir}/NetworkManager
|
||||
|
||||
# general config
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
# Sanity checks.
|
||||
[ -x $NETWORKMANAGER_BIN ] || exit 0
|
||||
|
||||
# We need /usr/sbin/ip
|
||||
[ -x /usr/sbin/ip ] || exit 0
|
||||
|
||||
PID=`pidof -o %PPID $NETWORKMANAGER_BIN`
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting NetworkManager"
|
||||
if [ -z "$PID" ]; then
|
||||
$NETWORKMANAGER_BIN
|
||||
fi
|
||||
if [ ! -z "$PID" -o $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon NetworkManager
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping NetworkManager"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon NetworkManager
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
|
||||
|
||||
|
@@ -14,3 +14,6 @@ endif
|
||||
if TARGET_SUSE
|
||||
SUBDIRS += SUSE
|
||||
endif
|
||||
if TARGET_ARCH
|
||||
SUBDIRS += Arch
|
||||
endif
|
||||
|
Reference in New Issue
Block a user