#!/bin/bash # 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. # I don't know why things were that way before, but I'm told to set them that way again. echo 'Moving things around..' [ -d /home ] && mv /home /var/media/backup mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace} ln -s /var/media/backup/dump /dump ln -s /var/media/backup/home /home ln -s /var/media/backup/rec /rec ln -s /var/media/prod /var/media/backup/prod ln -s /etc/hosts.30MHzMDF /etc/hosts.30MHz ln -s /etc/hosts.8MHzMHF /etc/hosts.8MHz ln -s /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32 ln -s /initrd.img /opt/tftp/initrd.img ln -s /vmlinuz /opt/tftp/vmlinuz ln -s /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0 ln -s /usr/lib/syslinux/memdisk /opt/tftp/memdisk echo 'Things moved.' # now enable all the scripts and such.. echo 'Enabling on-startup scripts..' update-rc.d waitswitches defaults update-rc.d waitswitches enable update-rc.d etherwake defaults update-rc.d etherwake enable update-rc.d ipmiwake defaults update-rc.d ipmiwake enable update-rc.d wakeonlan defaults update-rc.d wakeonlan enable update-rc.d waitslaves defaults update-rc.d shutdownallblades defaults update-rc.d checkudevrules enable update-rc.d checkudevrules defaults echo 'Scripts enabled.' # and these other things too echo 'Finalizing configuration..' chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf* cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf chsh -s /usr/bin/pdmenu trc6500 # from that sync_master.sh script.. Apparently there from Git shenanigans. chmod go-rwx /root/.ssh/id_rsa chmod go-rwx /opt/cluster/slave/root/.ssh chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa chmod a+rwx /opt/tftp echo "">/var/log/atftpd.log chown nobody /var/log/atftpd.log update-initramfs -u cd /opt/cluster # 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. # this is still here because it is planned we install/update this on established systems [ -f /sbin/start-stop-daemon.REAL ] || make all echo 'Finalized.'