iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
root2 partitions, various improvements
[automated-distro-installer]
/
fai
/
config
/
files
/
etc
/
rc.local
/
FAISERVER
diff --git
a/fai/config/files/etc/rc.local/FAISERVER
b/fai/config/files/etc/rc.local/FAISERVER
index e70fae952205b7e5689cd19881a7e745060faa04..fddf54aae51e8b8687687efe38a9a549afbda86a 100755
(executable)
--- a/
fai/config/files/etc/rc.local/FAISERVER
+++ b/
fai/config/files/etc/rc.local/FAISERVER
@@
-10,8
+10,10
@@
GREEN='\E[32m'
set -o pipefail
# setup network
set -o pipefail
# setup network
-nic=$(awk '/iface/ {print $2}' /etc/network/interfaces |egrep -v ^lo)
-ifup $nic
+nic=$(cat /etc/network/interfaces /etc/network/interfaces.d/* 2>/dev/null | awk '$1 == "iface" && $2 != "lo" {print $2; exit}')
+if [ -n "$nic" ]; then
+ ifup $nic
+fi
# regenerate ssh_host keys
ls /etc/ssh/ssh_host_* > /dev/null
if [ $? -ne 0 ]; then
# regenerate ssh_host keys
ls /etc/ssh/ssh_host_* > /dev/null
if [ $? -ne 0 ]; then