added fail safe...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-08-06 02:33:37 +03:00
parent bb1b2cba15
commit 0be2837c6d
2 changed files with 6 additions and 2 deletions

View File

@ -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}$@"

View File

@ -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