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..' | |
e043b5aa | 8 | logger -t 'trc6500 first boot' 'Replacing the /etc/network/interfaces file..' |
9c7f26be OL |
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 | ||
e043b5aa OL |
16 | # we generate the tarballs given to the slave blades here, since if we do it during install they might get "locked" versions of files |
17 | echo '(trc6500 first boot) Generating tarballs..' | |
18 | logger -t 'trc6500 first boot' 'Generating tarballs..' | |
19 | cd /opt/cluster | |
20 | make all | |
21 | echo '(trc6500 first boot) Done generating.' | |
22 | ||
23 | ||
9c7f26be OL |
24 | # now let's delete this script and replace it with the vanilla one |
25 | echo '(trc6500 first boot) Replacing this script with original /etc/rc.local..' | |
e043b5aa | 26 | logger -t 'trc6500 first boot' 'Replacing this script with original /etc/rc.local..' |
9c7f26be OL |
27 | rm -f /etc/rc.local && mv /etc/rc.local.original /etc/rc.local |
28 | echo '(trc6500 first boot) Done replacing' | |
29 | ||
30 | exit 0 |