Elegance in startup scripts
This commit is contained in:
parent
2536e74d37
commit
aacab67bb8
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
|
printf "Loading kernel modules: "
|
||||||
/sbin/modprobe qca6174
|
/sbin/modprobe qca6174
|
||||||
/sbin/modprobe wireguard
|
/sbin/modprobe wireguard
|
||||||
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start}"
|
echo "Usage: $0 {start}"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
status=`cat /proc/sys/kernel/random/entropy_avail`
|
status=`cat /proc/sys/kernel/random/entropy_avail`
|
||||||
echo "Waiting for enough entropy: "
|
printf "Waiting for enough entropy: "
|
||||||
while [ $status -lt 200 ]; do
|
while [ $status -lt 200 ]; do
|
||||||
sleep 2
|
sleep 2
|
||||||
status=`cat /proc/sys/kernel/random/entropy_avail`
|
status=`cat /proc/sys/kernel/random/entropy_avail`
|
||||||
|
@ -11,6 +11,7 @@ case "$1" in
|
|||||||
WPA=`cat /etc/wpa`
|
WPA=`cat /etc/wpa`
|
||||||
sed -i "s/{{SSID}}/$SSID/g" /etc/hostapd.conf
|
sed -i "s/{{SSID}}/$SSID/g" /etc/hostapd.conf
|
||||||
sed -i "s/{{WPA}}/$WPA/g" /etc/hostapd.conf
|
sed -i "s/{{WPA}}/$WPA/g" /etc/hostapd.conf
|
||||||
|
echo "OK"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start}"
|
echo "Usage: $0 {start}"
|
||||||
|
Loading…
Reference in New Issue
Block a user