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