[crux-commits] ports/opt (3.6): iwd: new rc script which does not start dhcpcd

crux at crux.nu crux at crux.nu
Sun Jul 19 09:23:18 UTC 2020


commit 050191b6e1adf4e25a5ab611eabfe28de83ef072
Author: Juergen Daubert <jue at jue.li>
Date:   Sun Jul 19 09:16:12 2020 +0000

    iwd: new rc script which does not start dhcpcd

diff --git a/iwd/.signature b/iwd/.signature
index cab2a144e..8d03eb696 100644
--- a/iwd/.signature
+++ b/iwd/.signature
@@ -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
diff --git a/iwd/Pkgfile b/iwd/Pkgfile
index 8de054436..322eca2cc 100644
--- a/iwd/Pkgfile
+++ b/iwd/Pkgfile
@@ -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)
 
diff --git a/iwd/iwd b/iwd/iwd
index 3844feb03..4069a90cf 100755
--- a/iwd/iwd
+++ b/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
+PROG=/usr/sbin/iwd
+PID=/var/run/iwd.pid
+OPTS=""
 
-OPTS_DHCP=""
-OPTS_WIFI=""
-
-
-print_status() {
-	$SSD --status --pidfile $2
+case $1 in
+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 "$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" ;;
+	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
-}
-
-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]"
-		;;
+	;;
+*)
+	echo "Usage: $0 [start|stop|restart|status]"
+	;;
 esac
 
-exit $RETVAL
-
 # End of file
 


More information about the crux-commits mailing list