-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NGFW-12492 Rename post install files. Add install-only routines to pe…
…rform interface renaming. z20 includes interface remapping.
- Loading branch information
1 parent
1f2a9ae
commit c3b0176
Showing
6 changed files
with
61 additions
and
21 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
untangle-hardware-caswell-z12/debian/untangle-hardware-caswell-z12.postinst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
7 changes: 0 additions & 7 deletions
7
untangle-hardware-caswell-z12/debian/untangle-hardware-portwell-z12.postinst
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
untangle-hardware-caswell-z20/debian/untangle-hardware-caswell-z20.postinst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
7 changes: 0 additions & 7 deletions
7
untangle-hardware-caswell-z20/debian/untangle-hardware-portwell-z20.postinst
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
untangle-hardware-caswell-z6/debian/untangle-hardware-caswell-z6.postinst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
7 changes: 0 additions & 7 deletions
7
untangle-hardware-caswell-z6/debian/untangle-hardware-portwell-z6.postinst
This file was deleted.
Oops, something went wrong.