X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=simple-cdd%2Fmyrc.local;fp=simple-cdd%2Fmyrc.local;h=9c8d58d85970688a9e8c6e19fc6ae8861afd6c14;hb=9c7f26beb3643499203fca3668ba7024e6823af4;hp=0000000000000000000000000000000000000000;hpb=6ded6f01e55bbc73e2505f8fdaaf6a4410a038b0;p=debian6500.git diff --git a/simple-cdd/myrc.local b/simple-cdd/myrc.local new file mode 100755 index 0000000..9c8d58d --- /dev/null +++ b/simple-cdd/myrc.local @@ -0,0 +1,22 @@ +#!/bin/sh + +# this file will replace /etc/rc.local for the first boot of the machine. Before that, we'll have saved the original rc.local as rc.local.original and we'll restore it at the end of this script. + + +# our own /etc/network/interfaces gets written over for some reason, lets put it back where it belongs +echo '(trc6500 first boot) Replacing the /etc/network/interfaces file..' +logger '(trc6500 first boot) Replacing the /etc/network/interfaces file..' +rm -f /etc/network/interfaces +mv /etc/network/interfaces.original /etc/network/interfaces +# interfaces.new was hopefully created during the install, after master.tar was unpacked + +echo '(trc6500 first boot) Done replacing interfaces file.' + + +# now let's delete this script and replace it with the vanilla one +echo '(trc6500 first boot) Replacing this script with original /etc/rc.local..' +logger '(trc6500 first boot) Replacing this script with original /etc/rc.local..' +rm -f /etc/rc.local && mv /etc/rc.local.original /etc/rc.local +echo '(trc6500 first boot) Done replacing' + +exit 0