diff --git a/image-extras/common/root/autoprovision-functions.sh b/image-extras/common/root/autoprovision-functions.sh index e2a438b..ff34c25 100755 --- a/image-extras/common/root/autoprovision-functions.sh +++ b/image-extras/common/root/autoprovision-functions.sh @@ -10,31 +10,33 @@ rootUUID=05d615b3-bef8-460c-9a23-52db8d09e000 dataUUID=05d615b3-bef8-460c-9a23-52db8d09e001 swapUUID=05d615b3-bef8-460c-9a23-52db8d09e002 -. /lib/ar71xx.sh +if [ -f /lib/ar71xx.sh ]; then + . /lib/ar71xx.sh -# let's try some defaults... -autoprovisionUSBLed="tp-link:green:usb" -autoprovisionStatusLed="tp-link:green:qss" + # let's attempt to define some defaults... + autoprovisionUSBLed="tp-link:green:usb" + autoprovisionStatusLed="tp-link:green:qss" -# CUSTOMIZE -case $(ar71xx_board_name) in -"tl-wr1043nd") - autoprovisionUSBLed="tp-link:green:usb" - autoprovisionStatusLed="tp-link:green:qss" - ;; -"tl-mr3020") - autoprovisionUSBLed="tp-link:green:wps" - autoprovisionStatusLed="tp-link:green:wlan" - ;; -"tl-wr2543n") - autoprovisionUSBLed="tp-link:green:wps" - autoprovisionStatusLed="tp-link:green:wlan5g" - ;; -"tl-wdr4300") - autoprovisionUSBLed="tp-link:blue:wan" - autoprovisionStatusLed="tp-link:blue:qss" - ;; -esac + # CUSTOMIZE + case $(ar71xx_board_name) in + "tl-wr1043nd") + autoprovisionUSBLed="tp-link:green:usb" + autoprovisionStatusLed="tp-link:green:qss" + ;; + "tl-mr3020") + autoprovisionUSBLed="tp-link:green:wps" + autoprovisionStatusLed="tp-link:green:wlan" + ;; + "tl-wr2543n") + autoprovisionUSBLed="tp-link:green:wps" + autoprovisionStatusLed="tp-link:green:wlan5g" + ;; + "tl-wdr4300") + autoprovisionUSBLed="tp-link:blue:wan" + autoprovisionStatusLed="tp-link:blue:qss" + ;; + esac +fi log() {