From 0be2837c6d6d093257a68b9d2a12bee317bdc8e5 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 6 Aug 2024 02:33:37 +0300 Subject: [PATCH] added fail safe... Signed-off-by: Alex A. Naanou --- .pct-helpers | 2 +- host/make.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pct-helpers b/.pct-helpers index 44c4d3a..58668ea 100644 --- a/.pct-helpers +++ b/.pct-helpers @@ -21,7 +21,7 @@ CT_DIR=${CT_DIR:=/etc/pve/lxc/} #QUIET= #DRY_RUN= ECHO_PREFIX="### " -@(){ +function @ (){ if [ -z $DRY_RUN ] ; then ! [ $QUIET ] \ && echo -e "${ECHO_PREFIX}$@" diff --git a/host/make.sh b/host/make.sh index f55844f..8089b49 100755 --- a/host/make.sh +++ b/host/make.sh @@ -102,7 +102,11 @@ if xreadYes "# Create bridges?" BRIDGES ; then fi if reviewApplyChanges /etc/network/interfaces ; then - @ ifreload -a + if ! @ ifreload -a ; then + # reset settings back if ifreload fails... + @ cp /etc/network/interfaces{.bak,} + @ ifreload -a + fi fi fi