fix for bug 4440: write /etc/network/interfaces to /etc/network/interfaces.d/<nicname>, check if the target file name is blank
This commit is contained in:
parent
5ef5b62877
commit
2e32683a52
7
xCAT/postscripts/xcatlib.sh
Normal file → Executable file
7
xCAT/postscripts/xcatlib.sh
Normal file → Executable file
@ -66,7 +66,12 @@ function debianpreconf(){
|
||||
#write lines into the conffile
|
||||
echo $str_line >> $str_conf_file
|
||||
else
|
||||
echo $str_line >> $str_conf_file
|
||||
# Write the remaining lines of the nic conf info to conffile
|
||||
# It is possible that there are some lines at the beginning of /etc/network/interfaces,
|
||||
# that we could not recognize, ignore these lines. The indication is that the str_conf_file is empty
|
||||
if [ ! -z "$str_conf_file" ]; then
|
||||
echo $str_line >> $str_conf_file
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user