iwd: new rc script which does not start dhcpcd
This commit is contained in:
parent
31d86da29b
commit
050191b6e1
@ -1,6 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/TQwgqTGevRpb6Rau2mIXwxhm5Pj6bIgou4/P69BKu7ueF+hvwBrNdonJu2R9oB1XoTMj1AzTlJ6yXbV6yn+Rws=
|
||||
SHA256 (Pkgfile) = 4d8cba5d2991d2dcae2da30593b6cdd1e850ffb3b7d60538c0f61d4bccf1a6d7
|
||||
RWSE3ohX2g5d/T1CD+nXRSF3anBGucT0VmMvcohZX4hOaMhdLSxyDmC7VH01BCd1IacSqHouDl4OV9bjYvDPMSVas4kUCAbBFAw=
|
||||
SHA256 (Pkgfile) = 26340f5a59b608c58e19e6643e2b643e8d05b35a1b6e922dec9c1c7d1aa02918
|
||||
SHA256 (.footprint) = a60cef8543228097ca8ab4977eae0436066fd53eeb768135768d62571b88cde7
|
||||
SHA256 (iwd-1.8.tar.xz) = 3c5074576f12a6f0f601aaa0f13863379ae4956f32d9d0937542025a4c136a8f
|
||||
SHA256 (iwd) = f0eaab15666fed402e984ff12a923ce857a4985ab2e6e00c8da35fecb81c219e
|
||||
SHA256 (iwd) = 6500824fc8993b22e61be415b3ae9bc971b6eef56d3fb4c60255f1065cf2eac6
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
name=iwd
|
||||
version=1.8
|
||||
release=1
|
||||
release=2
|
||||
source=(https://www.kernel.org/pub/linux/network/wireless/$name-$version.tar.xz
|
||||
iwd)
|
||||
|
||||
|
66
iwd/iwd
66
iwd/iwd
@ -4,50 +4,34 @@
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG_DHCP=/sbin/dhcpcd
|
||||
PROG_WIFI=/usr/sbin/iwd
|
||||
PID_DHCP=/var/run/dhcpcd.pid
|
||||
PID_WIFI=/var/run/iwd.pid
|
||||
|
||||
OPTS_DHCP=""
|
||||
OPTS_WIFI=""
|
||||
|
||||
|
||||
print_status() {
|
||||
$SSD --status --pidfile $2
|
||||
case $? in
|
||||
0) echo "$1 is running with pid $(cat $2)" ;;
|
||||
1) echo "$1 is not running but the pid file $2 exists" ;;
|
||||
3) echo "$1 is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
}
|
||||
PROG=/usr/sbin/iwd
|
||||
PID=/var/run/iwd.pid
|
||||
OPTS=""
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start -bmC --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \
|
||||
$SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
( $SSD --stop --retry 10 --pidfile $PID_DHCP
|
||||
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID_WIFI )
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
print_status $PROG_WIFI $PID_WIFI
|
||||
print_status $PROG_DHCP $PID_DHCP
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
start)
|
||||
$SSD --start -bmC --pidfile $PID --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --pidfile $PID
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(cat $PID)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
# End of file
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user