mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 11:10:09 +00:00
added interfaces final...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1a398a7d42
commit
69b5ac30b9
20
host/make.sh
20
host/make.sh
@ -143,12 +143,18 @@ if xreadYes "# Create bridges?" BRIDGES ; then
|
|||||||
if [ -z "$DRY_RUN" ] ; then
|
if [ -z "$DRY_RUN" ] ; then
|
||||||
# write both bootstrap and clean bridge configurations...
|
# write both bootstrap and clean bridge configurations...
|
||||||
if ! [ -z $BRIDGES_BOOTSTRAP ] ; then
|
if ! [ -z $BRIDGES_BOOTSTRAP ] ; then
|
||||||
|
|
||||||
|
# interfaces.final
|
||||||
|
@ cp "$INTERFACES"{.new,.final}
|
||||||
|
@ sed -i \
|
||||||
|
-e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \
|
||||||
|
-e 's/^.*gateway .*$//' \
|
||||||
|
"$INTERFACES".final
|
||||||
|
echo "$BRIDGES" \
|
||||||
|
>> "$INTERFACES".final
|
||||||
|
|
||||||
|
# interfaces.clean
|
||||||
@ cp "$INTERFACES"{.new,.clean}
|
@ cp "$INTERFACES"{.new,.clean}
|
||||||
# XXX disconnect bootstrap and connnect admin...
|
|
||||||
# ...make this optional...
|
|
||||||
#@ sed -i \
|
|
||||||
# -e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \
|
|
||||||
# "$INTERFACES".clean
|
|
||||||
@ sed -i \
|
@ sed -i \
|
||||||
-e 's/^.*gateway .*\n//' \
|
-e 's/^.*gateway .*\n//' \
|
||||||
"$INTERFACES".clean
|
"$INTERFACES".clean
|
||||||
@ -156,17 +162,21 @@ if xreadYes "# Create bridges?" BRIDGES ; then
|
|||||||
| sed \
|
| sed \
|
||||||
-e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \
|
-e 's/'$ADMIN_PORT'/'$BOOTSTRAP_PORT'/' \
|
||||||
>> "$INTERFACES".clean
|
>> "$INTERFACES".clean
|
||||||
|
|
||||||
|
# interfaces.new (prep)
|
||||||
BRIDGES=$(\
|
BRIDGES=$(\
|
||||||
echo "$BRIDGES_BOOTSTRAP" \
|
echo "$BRIDGES_BOOTSTRAP" \
|
||||||
| sed -e 's/^.*gateway .*$//')
|
| sed -e 's/^.*gateway .*$//')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# interfaces.new
|
||||||
echo "$BRIDGES" >> "$INTERFACES".new
|
echo "$BRIDGES" >> "$INTERFACES".new
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$BRIDGES"
|
echo "$BRIDGES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# interfaces
|
||||||
if reviewApplyChanges "$INTERFACES" ; then
|
if reviewApplyChanges "$INTERFACES" ; then
|
||||||
# XXX this must be done in nohup to avoid breaking on connection lost...
|
# XXX this must be done in nohup to avoid breaking on connection lost...
|
||||||
if ! @ ifreload -a ; then
|
if ! @ ifreload -a ; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user