02ee161e81
Setting up a routine to run at first time the system boot may vary from distribution to distribution. This patch will remove the logic from the diskimage-builder code and put it into the elements. The base element will now deploy a dib-first-boot script and each OS element will ensure that this script runs at rc.local time. By doing that we will put the OS specific stuff in the OS elements and remove the embedded code out of the img-function file. Change-Id: I24c5d1b1185de5693f145347fe912245f1ba7dfe
21 lines
258 B
Bash
Executable file
21 lines
258 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
if [ -d /etc/first-boot.d ]; then
|
|
rc_local=/etc/rc.local
|
|
|
|
mv $rc_local $rc_local.REAL
|
|
|
|
dd of=$rc_local <<EOF
|
|
#!/bin/bash
|
|
set -e
|
|
set -o xtrace
|
|
|
|
dib-first-boot
|
|
|
|
mv $rc_local.REAL $rc_local
|
|
exit 0
|
|
EOF
|
|
|
|
chmod 755 $rc_local
|
|
fi
|