Commit | Line | Data |
---|---|---|
9c7f26be OL |
1 | #!/bin/sh |
2 | ||
3 | # 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. | |
4 | ||
5 | ||
6 | # our own /etc/network/interfaces gets written over for some reason, lets put it back where it belongs | |
7 | echo '(trc6500 first boot) Replacing the /etc/network/interfaces file..' | |
8 | logger '(trc6500 first boot) Replacing the /etc/network/interfaces file..' | |
9 | rm -f /etc/network/interfaces | |
10 | mv /etc/network/interfaces.original /etc/network/interfaces | |
11 | # interfaces.new was hopefully created during the install, after master.tar was unpacked | |
12 | ||
13 | echo '(trc6500 first boot) Done replacing interfaces file.' | |
14 | ||
15 | ||
16 | # now let's delete this script and replace it with the vanilla one | |
17 | echo '(trc6500 first boot) Replacing this script with original /etc/rc.local..' | |
18 | logger '(trc6500 first boot) Replacing this script with original /etc/rc.local..' | |
19 | rm -f /etc/rc.local && mv /etc/rc.local.original /etc/rc.local | |
20 | echo '(trc6500 first boot) Done replacing' | |
21 | ||
22 | exit 0 |