-
-
Save tdack/c57b475d9346a043a1b7 to your computer and use it in GitHub Desktop.
/etc/initramfs-tools/hooks/wlan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PREREQ="" | |
prereqs() | |
{ | |
echo "$PREREQ" | |
} | |
case $1 in | |
# get pre-requisites | |
prereqs) | |
prereqs | |
exit 0 | |
;; | |
esac | |
if [ ! -e /etc/wpa_supplicant/wpa_supplicant.conf ]; then | |
exit 0 | |
fi | |
. /usr/share/initramfs-tools/hook-functions | |
copy_exec /sbin/wpa_action /sbin | |
copy_exec /sbin/wpa_cli /sbin | |
copy_exec /sbin/wpa_supplicant /sbin | |
mkdir -p $DESTDIR/etc/network/ | |
mkdir -p $DESTDIR/etc/wpa_supplicant/ | |
cp /etc/wpa_supplicant/action_wpa.sh $DESTDIR/etc/wpa_supplicant/ | |
cp /etc/wpa_supplicant/functions.sh $DESTDIR/etc/wpa_supplicant/ | |
cp /etc/wpa_supplicant/ifupdown.sh $DESTDIR/etc/wpa_supplicant/ | |
cp /etc/wpa_supplicant/wpa_supplicant.conf $DESTDIR/etc/wpa_supplicant/ | |
cp /etc/network/interfaces $DESTDIR/etc/network/ | |
for x in crc_ccitt rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 cfg 80211 rfkill led_class; do | |
manual_add_modules ${x} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment