wpa_supplicant: new rc script wpa_supplicant, rc script wlan reworked
This commit is contained in:
parent
050191b6e1
commit
c79887e549
@ -4,6 +4,7 @@ drwxr-xr-x root/root etc/dbus-1/system.d/
|
|||||||
-rw-r--r-- root/root etc/dbus-1/system.d/wpa_supplicant.conf
|
-rw-r--r-- root/root etc/dbus-1/system.d/wpa_supplicant.conf
|
||||||
drwxr-xr-x root/root etc/rc.d/
|
drwxr-xr-x root/root etc/rc.d/
|
||||||
-rwxr-xr-x root/root etc/rc.d/wlan
|
-rwxr-xr-x root/root etc/rc.d/wlan
|
||||||
|
-rwxr-xr-x root/root etc/rc.d/wpa_supplicant
|
||||||
-rw------- root/root etc/wpa_supplicant.conf
|
-rw------- root/root etc/wpa_supplicant.conf
|
||||||
drwxr-xr-x root/root usr/
|
drwxr-xr-x root/root usr/
|
||||||
drwxr-xr-x root/root usr/sbin/
|
drwxr-xr-x root/root usr/sbin/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
untrusted comment: verify with /etc/ports/opt.pub
|
untrusted comment: verify with /etc/ports/opt.pub
|
||||||
RWSE3ohX2g5d/bBkglfc5Kf7FqO75e8sBRoDxeEu1jE19YyVOSNtu/B1zczVCl2lj+IEzSo7QPQferyOiW2Lq2O+4+x9TVE+aww=
|
RWSE3ohX2g5d/Z8F24R/uGzt+LbODHEqKa+KVfxqZHO3MUmvLqMtLaHfPIf9kBgf11ptZptyHR/sWsOK4dAXyvTeeDfwqHcU8QE=
|
||||||
SHA256 (Pkgfile) = 7a7e255e574e99249c90d88b100fdd6f48e20ab023b6227513e4db0801e91b6b
|
SHA256 (Pkgfile) = 508a0c594521cbef1a989d3f230f5d409febc6a11ba0ceefa73a3a76aa58319a
|
||||||
SHA256 (.footprint) = d4302c7846d3447459040f032e05e10dc251113e6a1555b045a4d95aded9e409
|
SHA256 (.footprint) = c601da7d8f0118f98fe747611466a530d48519832c8aba47db01df055d64f869
|
||||||
SHA256 (wpa_supplicant-2.9.tar.gz) = fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17
|
SHA256 (wpa_supplicant-2.9.tar.gz) = fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17
|
||||||
SHA256 (wlan) = 62f4c0bf8d5fedcf5b6ad79278f4be16f29841099f385acc4fc91e2d52ca1927
|
SHA256 (wpa_supplicant) = 6d7c37c49d4f06194195ca1e7c66a4bb067d82e3884b278e6cdd72c6f7476bae
|
||||||
|
SHA256 (wlan) = c025ad557806d86ef231770c8a77a02a0194d92d89b5fb16bec036eddbc5d308
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
name=wpa_supplicant
|
name=wpa_supplicant
|
||||||
version=2.9
|
version=2.9
|
||||||
release=1
|
release=2
|
||||||
source=(https://w1.fi/releases/$name-$version.tar.gz
|
source=(https://w1.fi/releases/$name-$version.tar.gz
|
||||||
wlan)
|
wpa_supplicant wlan)
|
||||||
|
|
||||||
build () {
|
build () {
|
||||||
cd $name-$version/$name
|
cd $name-$version/$name
|
||||||
@ -31,6 +31,7 @@ build () {
|
|||||||
|
|
||||||
# rc script
|
# rc script
|
||||||
install -D -m 0755 $SRC/wlan $PKG/etc/rc.d/wlan
|
install -D -m 0755 $SRC/wlan $PKG/etc/rc.d/wlan
|
||||||
|
install -m 0755 $SRC/wpa_supplicant $PKG/etc/rc.d
|
||||||
|
|
||||||
# dbus
|
# dbus
|
||||||
install -d $PKG/{usr/share/dbus-1/system-services,etc/dbus-1/system.d}
|
install -d $PKG/{usr/share/dbus-1/system-services,etc/dbus-1/system.d}
|
||||||
|
@ -3,54 +3,26 @@
|
|||||||
# /etc/rc.d/wlan: start/stop wireless interface
|
# /etc/rc.d/wlan: start/stop wireless interface
|
||||||
#
|
#
|
||||||
|
|
||||||
DEV=wlp3s0
|
|
||||||
|
|
||||||
|
|
||||||
SSD=/sbin/start-stop-daemon
|
|
||||||
PROG_DHCP=/sbin/dhcpcd
|
|
||||||
PROG_WIFI=/usr/sbin/wpa_supplicant
|
|
||||||
PID_DHCP=/var/run/dhcpcd.pid
|
|
||||||
PID_WIFI=/var/run/wpa_supplicant.pid
|
|
||||||
|
|
||||||
OPTS_DHCP="--waitip -h $(/bin/hostname) -z $DEV"
|
|
||||||
OPTS_WIFI="-B -P $PID_WIFI -D nl80211,wext -c /etc/wpa_supplicant.conf -i $DEV"
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
$SSD --start --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \
|
/etc/rc.d/wpa_supplicant start
|
||||||
$SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP
|
/etc/rc.d/dhcpcd start
|
||||||
RETVAL=$?
|
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
( $SSD --stop --retry 10 --pidfile $PID_DHCP
|
/etc/rc.d/dhcpcd stop
|
||||||
$SSD --stop --retry 10 --pidfile $PID_WIFI )
|
/etc/rc.d/wpa_supplicant stop
|
||||||
RETVAL=$?
|
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
$0 stop
|
/etc/rc.d/wpa_supplicant restart
|
||||||
$0 start
|
/etc/rc.d/dhcpcd restart
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
print_status $PROG_WIFI $PID_WIFI
|
/etc/rc.d/wpa_supplicant status
|
||||||
print_status $PROG_DHCP $PID_DHCP
|
/etc/rc.d/dhcpcd status
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 [start|stop|restart|status]"
|
echo "Usage: $0 [start|stop|restart|status]"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $RETVAL
|
|
||||||
|
|
||||||
# End of file
|
# End of file
|
||||||
|
|
||||||
|
39
wpa_supplicant/wpa_supplicant
Executable file
39
wpa_supplicant/wpa_supplicant
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# /etc/rc.d/wpa_supplicant: start/stop wpa_supplicant
|
||||||
|
#
|
||||||
|
|
||||||
|
DEV=wlp3s0
|
||||||
|
|
||||||
|
SSD=/sbin/start-stop-daemon
|
||||||
|
PROG=/usr/sbin/wpa_supplicant
|
||||||
|
PID=/var/run/wpa_supplicant.pid
|
||||||
|
OPTS="-B -P $PID -D nl80211,wext -c /etc/wpa_supplicant.conf -i $DEV"
|
||||||
|
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
start)
|
||||||
|
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
$SSD --stop --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
|
||||||
|
|
||||||
|
# End of file
|
Loading…
x
Reference in New Issue
Block a user