redmine

Added a protection against empty config file

Showing 1 changed file with 7 additions and 0 deletions
... ... @@ -311,6 +311,13 @@ case "$CMD" in
fix) #fix all interfaces to config state
#brctl addif bond0 eth2
if [[ "$IPW_CONFIG_PATH" != "/dev/null" ]]; then
if [[ "$(cat $IPW_CONFIG_PATH 2>/dev/null)" = "" ]]; then
eerror "Empty config file"
exit -1
fi
fi
#GETTING INFORMATION ABOUT LXC INTERFACES IN BRIDGES
if [[ "$LXC_DIR" != "" ]]; then
... ...