Working upgrade connect.sh/disconnect.sh; custom busybox config

This commit is contained in:
Giulio 2020-09-18 12:59:02 +02:00
parent d7c0e19f5f
commit 4b7dbcde53
5 changed files with 1200 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@ BR2_PACKAGE_HOST_IMX_MKIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_BUSYBOX_CONFIG="board/tiesse/tgr/busybox.config"
BR2_GLOBAL_PATCH_DIR="board/tiesse/tgr/packages-patches/"
BR2_RELRO_FULL=y
BR2_TARGET_GENERIC_HOSTNAME="cros"

View File

@ -10,4 +10,4 @@ Defaults insults
Defaults log_input,log_output
www-data ALL=(upgrade) NOPASSWD: /bin/sh /update.sh
upgrade ALL=(root) NOPASSWD: /usr/sbin/iw client0 scan, /sbin/iw client0 link, /bin/cat /etc/wpa_supplicant.conf, /bin/sh /wifi/connect.sh *, /bin/sh /wifi/disconnect.sh
upgrade ALL=(root) NOPASSWD: /usr/sbin/iw client0 scan, /usr/sbin/iw client0 link, /bin/cat /etc/wpa_supplicant.conf, /bin/sh /wifi/connect.sh *, /bin/sh /wifi/disconnect.sh

View File

@ -5,5 +5,7 @@ if [ "$#" -ne 2 ]; then
exit 1
fi
/usr/bin/wpa_passphrase "$1" "$2" > /etc/wpa_supplicant.conf
/bin/echo "ctrl_interface=/var/run/wpa_supplicant" > /etc/wpa_supplicant.conf
/usr/bin/wpa_passphrase "$1" "$2" >> /etc/wpa_supplicant.conf
/usr/sbin/wpa_supplicant -B -i client0 -c /etc/wpa_supplicant.conf
/sbin/udhcpc -i client0

View File

@ -1,3 +1,4 @@
#!/bin/sh
/usr/sbin/wpa_cli -i client0 terminate
/sbin/ip addr flush dev client0