diff options
author | tequa | 2019-07-25 09:07:15 +0200 |
---|---|---|
committer | tequa | 2019-07-25 09:08:18 +0200 |
commit | dce3d73e28d4f2d013e5351d231c3fded6b61ade (patch) | |
tree | f52c909a8ec4d7c39fde2c613fd9d7dfeb8873bb | |
parent | c28673eb9d6cfb1a52bad8d23eb8f2b3408add9d (diff) | |
download | aur-dce3d73e28d4f2d013e5351d231c3fded6b61ade.tar.gz |
indentation + bash array improvements
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | wifi.hook | 28 | ||||
-rw-r--r-- | wifi.install | 12 |
4 files changed, 26 insertions, 26 deletions
@@ -1,7 +1,7 @@ pkgbase = mkinitcpio-wifi pkgdesc = mkinitcpio hook to enable wifi remote access pkgver = 0.1 - pkgrel = 1 + pkgrel = 2 url = https://aur.archlinux.org/packages/mkinitcpio-wifi/ install = mkinitcpio-wifi.install arch = any @@ -12,8 +12,8 @@ pkgbase = mkinitcpio-wifi optdepends = mkinitcpio-netconf source = wifi.hook source = wifi.install - sha256sums = d09c82d7b2756166b951de66d36094e4f03dfd5cd961cc1fa0852e119d09c828 - sha256sums = 325fd5aecf747549559eafa243be023c00276ca3c429c3d1222101f2075b7768 + sha256sums = e70a34a0a2ecf0d0d46308105b4be5dd8f245d32bac6e4a429fed35f433037bb + sha256sums = 64dd1704fec9eee158f39ab6e6fe24b08cd76d9cc5c657fe0c08ed1f7962a599 pkgname = mkinitcpio-wifi @@ -1,7 +1,7 @@ # Maintainer: tequa pkgname=mkinitcpio-wifi pkgver=0.1 -pkgrel=1 +pkgrel=2 pkgdesc="mkinitcpio hook to enable wifi remote access" arch=(any) license=('GPL') @@ -11,8 +11,8 @@ optdepends=(mkinitcpio-netconf) install="mkinitcpio-wifi.install" source=('wifi.hook' 'wifi.install') -sha256sums=('d09c82d7b2756166b951de66d36094e4f03dfd5cd961cc1fa0852e119d09c828' - '325fd5aecf747549559eafa243be023c00276ca3c429c3d1222101f2075b7768') +sha256sums=('e70a34a0a2ecf0d0d46308105b4be5dd8f245d32bac6e4a429fed35f433037bb' + '64dd1704fec9eee158f39ab6e6fe24b08cd76d9cc5c657fe0c08ed1f7962a599') package() { install -Dm 644 wifi.hook \ diff --git a/wifi.hook b/wifi.hook index 2813af145793..ee582191eec7 100644 --- a/wifi.hook +++ b/wifi.hook @@ -2,30 +2,30 @@ run_hook () { - # sleep a couple of seconds so wlan0 is setup by kernel - sleep 3 + # sleep a couple of seconds so wlan0 is setup by kernel + sleep 3 echo "Starting wifi" - # set wlan0 to up - ip link set wlan0 up + # set wlan0 to up + ip link set wlan0 up - # assocciate with wifi network - wpa_supplicant -B -D nl80211,wext -i wlan0 -c /etc/wpa_supplicant/initcpio.conf + # assocciate with wifi network + wpa_supplicant -B -D nl80211,wext -i wlan0 -c /etc/wpa_supplicant/initcpio.conf - # sleep a couple of seconds so that wpa_supplicant finishes connecting - sleep 5 + # sleep a couple of seconds so that wpa_supplicant finishes connecting + sleep 5 - # wlan0 should now be connected and ready to be assigned an ip by the net hook + # wlan0 should now be connected and ready to be assigned an ip by the net hook } run_cleanuphook () { - # kill wpa_supplicant running in the background - killall wpa_supplicant + # kill wpa_supplicant running in the background + killall wpa_supplicant - # set wlan0 link down - ip link set wlan0 down + # set wlan0 link down + ip link set wlan0 down - # wlan0 should now be fully disconnected from the wifi network + # wlan0 should now be fully disconnected from the wifi network } diff --git a/wifi.install b/wifi.install index ba299cd24a79..129daaa02308 100644 --- a/wifi.install +++ b/wifi.install @@ -16,14 +16,14 @@ get_mods_depending_on_recursive () { queue=(${mods[@]}) while (( ${#queue[*]} )) ; do - i_mod=${queue[${#queue[@]}-1]} - unset queue[${#queue[@]}-1] + i_mod=${queue[0]} + queue=(${queue[@]:1}) for i_testmod in $(get_mods_depending_on ${i_mod}) ; do in_array ${i_testmod} ${mods[@]} if [ $? != 0 ] ; then - mods[${#mods[*]}]=${i_testmod} - queue[${#queue[*]}]=${i_testmod} + mods+=(${i_testmod}) + queue+=(${i_testmod}) fi done done @@ -52,7 +52,7 @@ build () add_binary "killall" add_binary "wpa_supplicant" add_binary "ip" - add_runscript + add_runscript add_file "/etc/wpa_supplicant/initcpio.conf" "/etc/wpa_supplicant/initcpio.conf" } @@ -60,6 +60,6 @@ build () help () { cat<<HELPEOF - Enables wifi on boot, for ssh unlocking of disk. + Enables wifi on boot, for ssh unlocking of disk. HELPEOF } |