Skip to content

Commit

Permalink
NGFW-12492 Rename post install files. Add install-only routines to pe…
Browse files Browse the repository at this point in the history
…rform interface renaming. z20 includes interface remapping.
  • Loading branch information
cblaise-untangle committed Jun 21, 2019
1 parent 1f2a9ae commit c3b0176
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /bin/bash

deb-systemd-invoke restart untangle-hardware-config

rm -f /etc/init.d/${DPKG_MAINTSCRIPT_PACKAGE}

if [ -z "$2"] ; then
##
## On initial install:
##
## Change Interface names to physical port numbers.
sed --in-place \
--follow-symlinks \
-r 's/^([[:space:]]+)"name": "Interface ([[:digit:]]+)"/echo "\1\\"name\\":" \\"Interface $((\2-1))\\"/ge' \
/usr/share/untangle/settings/untangle-vm/network.js
fi


exit 0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/bash

deb-systemd-invoke restart untangle-hardware-config

rm -f /etc/init.d/${DPKG_MAINTSCRIPT_PACKAGE}

if [ -z "$2"] ; then
##
## On initial install:
##
## Properly map nics.
/usr/share/untangle/bin/ut-remap-nics.sh \
"eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8 eth9 eth10 eth11 eth12 eth13 eth14 eth15 eth16 eth17 eth18 eth19 eth20" \
"eth0 eth1 eth14 eth2 eth16 eth3 eth17 eth4 eth18 eth10 eth5 eth11 eth6 eth12 eth8 eth13 eth9 eth7 eth15 eth19 eth20" \

## Change Interface names to physical port numbers.
sed --in-place \
--follow-symlinks \
-r 's/^([[:space:]]+)"name": "Interface ([[:digit:]]+)"/echo "\1\\"name\\":" \\"Interface $((\2-1))\\"/ge' \
/usr/share/untangle/settings/untangle-vm/network.js
fi

exit 0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /bin/bash

deb-systemd-invoke restart untangle-hardware-config

rm -f /etc/init.d/${DPKG_MAINTSCRIPT_PACKAGE}

if [ -z "$2"] ; then
##
## On initial install:
##
## Change Interface names to physical port numbers.
sed --in-place \
--follow-symlinks \
-r 's/^([[:space:]]+)"name": "Interface ([[:digit:]]+)"/echo "\1\\"name\\":" \\"Interface $((\2-1))\\"/ge' \
/usr/share/untangle/settings/untangle-vm/network.js
fi


exit 0

This file was deleted.

0 comments on commit c3b0176

Please sign in to comment.