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.
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 [ -h /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 mkdir
-p /media
/floppy0
10 ln -sf /var
/media
/backup
/dump
/
11 ln -sf /var
/media
/backup
/home
/
12 ln -sf /var
/media
/backup
/rec
/
13 ln -sf /var
/media
/prod
/var
/media
/backup
/
14 ln -sf /etc
/hosts
.30MHzMDF
/etc
/hosts
.30MHz
15 ln -sf /etc
/hosts
.8MHzMHF
/etc
/hosts
.8MHz
16 ln -sf /usr
/lib
/syslinux
/menu.c32
/opt
/tftp
/menu.c32
17 ln -sf /initrd.img
/opt
/tftp
/initrd.img
18 ln -sf /vmlinuz
/opt
/tftp
/vmlinuz
19 ln -sf /usr
/lib
/syslinux
/pxelinux
.0 /opt
/tftp
/pxelinux
.0
20 ln -sf /usr
/lib
/syslinux
/memdisk
/opt
/tftp
/memdisk
23 # now enable all the scripts and such..
24 echo 'Enabling on-startup scripts..'
25 update-rc.d waitswitches defaults
26 update-rc.d waitswitches
enable
27 update-rc.d etherwake defaults
28 update-rc.d etherwake
enable
29 update-rc.d ipmiwake defaults
30 update-rc.d ipmiwake
enable
31 update-rc.d wakeonlan defaults
32 update-rc.d wakeonlan
enable
33 update-rc.d waitslaves defaults
34 update-rc.d shutdownallblades defaults
35 update-rc.d checkudevrules
enable
36 update-rc.d checkudevrules defaults
37 echo 'Scripts enabled.'
39 # and these other things too
40 echo 'Finalizing configuration..'
41 chown webconfig
/etc
/webconfig
/alias.d
/50-trc6500-master-file.csv
/etc
/dhcp
/dhcpd.conf
*
42 cp /etc
/dhcp
/dhcpd.conf.blank
/etc
/dhcp
/dhcpd.conf
43 chsh
-s /usr
/bin
/pdmenu trc6500
45 # from that sync_master.sh script.. Apparently there from Git shenanigans.
46 chmod go-rwx
/root
/.ssh
/id_rsa
47 chmod go-rwx
/opt
/cluster
/slave
/root
/.
ssh
48 chmod go-rwx
/opt
/cluster
/slave
/root
/.ssh
/id_rsa
51 echo "">/var
/log
/atftpd.log
52 chown nobody
/var
/log
/atftpd.log
54 # solve an issue with old trc6500-webconfig
55 touch /var
/cache
/webconfig
/snmp.tree
56 chown webconfig
: /var
/cache
/webconfig
/snmp.tree
61 # 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.
62 # this is still here because it is planned we install/update this on established systems
63 [ -f /sbin
/start-stop-daemon.REAL
] ||
make all