forked from finn/tinyboard
fix BACKUP_FILE unbound variable and add ping to dep checks
This commit is contained in:
@@ -26,7 +26,7 @@ check_deps() {
|
|||||||
|
|
||||||
[ "$(id -u)" -eq 0 ] || die "Run as root"
|
[ "$(id -u)" -eq 0 ] || die "Run as root"
|
||||||
|
|
||||||
check_deps ip netplan systemctl
|
check_deps ip netplan systemctl ping
|
||||||
|
|
||||||
header "TinyBoard Network Setup"
|
header "TinyBoard Network Setup"
|
||||||
|
|
||||||
@@ -118,6 +118,7 @@ if $IS_WIFI; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
header "Writing Netplan Config"
|
header "Writing Netplan Config"
|
||||||
|
BACKUP_FILE=""
|
||||||
if [ -f "$NETPLAN_FILE" ]; then
|
if [ -f "$NETPLAN_FILE" ]; then
|
||||||
BACKUP_FILE="/root/$(basename "${NETPLAN_FILE}").bak"
|
BACKUP_FILE="/root/$(basename "${NETPLAN_FILE}").bak"
|
||||||
cp "$NETPLAN_FILE" "$BACKUP_FILE"
|
cp "$NETPLAN_FILE" "$BACKUP_FILE"
|
||||||
|
|||||||
Reference in New Issue
Block a user