Commit | Line | Data |
---|---|---|
e043b5aa OL |
1 | #!/bin/bash |
2 | ||
3 | # since equivs can't handle symlinks, here we are doing them by hand. As of writing this script (2015-05-29), there are 11 symlinks to take care of. | |
4 | ||
5 | # I don't know why things were that way before, but I'm told to set them that way again. | |
6 | echo 'Moving things around..' | |
7 | [ -d /home ] && mv /home /var/media/backup | |
8 | mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace} | |
9 | ln -s /var/media/backup/dump /dump | |
10 | ln -s /var/media/backup/home /home | |
11 | ln -s /var/media/backup/rec /rec | |
12 | ln -s /var/media/prod /var/media/backup/prod | |
13 | ln -s /etc/hosts.30MHzMDF /etc/hosts.30MHz | |
14 | ln -s /etc/hosts.8MHzMHF /etc/hosts.8MHz | |
15 | ln -s /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32 | |
16 | ln -s /initrd.img /opt/tftp/initrd.img | |
17 | ln -s /vmlinuz /opt/tftp/vmlinuz | |
18 | ln -s /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0 | |
19 | ln -s /usr/lib/syslinux/memdisk /opt/tftp/memdisk | |
20 | echo 'Things moved.' | |
21 | ||
22 | # now enable all the scripts and such.. | |
23 | echo 'Enabling on-startup scripts..' | |
24 | update-rc.d waitswitches defaults | |
25 | update-rc.d waitswitches enable | |
26 | update-rc.d etherwake defaults | |
27 | update-rc.d etherwake enable | |
28 | update-rc.d ipmiwake defaults | |
29 | update-rc.d ipmiwake enable | |
30 | update-rc.d wakeonlan defaults | |
31 | update-rc.d wakeonlan enable | |
32 | update-rc.d waitslaves defaults | |
33 | update-rc.d shutdownallblades defaults | |
34 | update-rc.d checkudevrules enable | |
35 | update-rc.d checkudevrules defaults | |
36 | echo 'Scripts enabled.' | |
37 | ||
38 | # and these other things too | |
39 | echo 'Finalizing configuration..' | |
40 | chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf* | |
41 | cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf | |
42 | chsh -s /usr/bin/pdmenu trc6500 | |
43 | ||
44 | # from that sync_master.sh script.. Apparently there from Git shenanigans. | |
45 | chmod go-rwx /root/.ssh/id_rsa | |
46 | chmod go-rwx /opt/cluster/slave/root/.ssh | |
47 | chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa | |
48 | chmod a+rwx /opt/tftp | |
49 | ||
50 | echo "">/var/log/atftpd.log | |
51 | chown nobody /var/log/atftpd.log | |
52 | ||
53 | update-initramfs -u | |
54 | ||
55 | cd /opt/cluster | |
56 | # now this file is locked away during install and replaced by a dummy. So we put a duplicate of this in a script executed on first boot after the install. | |
57 | # this is still here because it is planned we install/update this on established systems | |
58 | [ -f /sbin/start-stop-daemon.REAL ] || make all | |
59 | echo 'Finalized.' | |
60 | ||
61 |