change version
[debian6500.git] / trc6500-master-file / postinst
CommitLineData
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.
6echo 'Moving things around..'
f12c94c8 7[ -h /home ] || mv /home /var/media/backup
e043b5aa 8mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace}
8d00e4ca 9mkdir -p /media/floppy0
f12c94c8
LM
10ln -sf /var/media/backup/dump /
11ln -sf /var/media/backup/home /
12ln -sf /var/media/backup/rec /
13ln -sf /var/media/prod /var/media/backup/
14ln -sf /etc/hosts.30MHzMDF /etc/hosts.30MHz
15ln -sf /etc/hosts.8MHzMHF /etc/hosts.8MHz
16ln -sf /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32
17ln -sf /initrd.img /opt/tftp/initrd.img
18ln -sf /vmlinuz /opt/tftp/vmlinuz
19ln -sf /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0
20ln -sf /usr/lib/syslinux/memdisk /opt/tftp/memdisk
e043b5aa
OL
21echo 'Things moved.'
22
23# now enable all the scripts and such..
24echo 'Enabling on-startup scripts..'
25update-rc.d waitswitches defaults
26update-rc.d waitswitches enable
27update-rc.d etherwake defaults
28update-rc.d etherwake enable
29update-rc.d ipmiwake defaults
30update-rc.d ipmiwake enable
31update-rc.d wakeonlan defaults
32update-rc.d wakeonlan enable
33update-rc.d waitslaves defaults
34update-rc.d shutdownallblades defaults
35update-rc.d checkudevrules enable
36update-rc.d checkudevrules defaults
37echo 'Scripts enabled.'
38
39# and these other things too
40echo 'Finalizing configuration..'
a5773812 41chown webconfig /etc/webconfig/alias.d/50-trc6500-master-file.csv /etc/dhcp/dhcpd.conf*
e043b5aa
OL
42cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf
43chsh -s /usr/bin/pdmenu trc6500
44
45# from that sync_master.sh script.. Apparently there from Git shenanigans.
46chmod go-rwx /root/.ssh/id_rsa
47chmod go-rwx /opt/cluster/slave/root/.ssh
48chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa
49chmod a+rwx /opt/tftp
50
51echo "">/var/log/atftpd.log
52chown nobody /var/log/atftpd.log
53
8c20b58f
LM
54# solve an issue with old trc6500-webconfig
55touch /var/cache/webconfig/snmp.tree
56chown webconfig: /var/cache/webconfig/snmp.tree
57
e043b5aa
OL
58update-initramfs -u
59
60cd /opt/cluster
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
64echo 'Finalized.'
65
66