# it operates from the point of view of the target computer, so / is the target's HDD and so on
# importantly enough, this is actually followed-up after reboot by a custom /etc/rc.local file, which erases itself after running (so it only runs on first reboot)
# the (abundant) feedback messages should not be visible, but they should appear on the installer's syslog. Also yes, I know writing "task finished" after something that might fail isn't the greatest thing.
+# note that much of what used to be here was put in the postinst file for the deb package we unpack
mount /dev/cdrom /media/cdrom
dpkg -i /media/cdrom/simple-cdd/firmware-bnx2_0.36+wheezy.1_all.deb
echo 'Additional packages installed.'
+#debugging
+echo 'force-confnew' > /etc/dpkg/dpkg.cfg.d/trc6500
+
# now we unpack our master archive and replace all those conf files and scripts and things
echo 'Unpacking master config files..'
-tar xzf /media/cdrom/simple-cdd/master.tar -C /
+dpkg -i /media/cdrom/simple-cdd/trc6500-master-file* # version-proof
chown root /etc/cron.d/getswitchtemp
chown root /root/bin/get_switch_temperature
echo 'Files unpacked.'
-# I don't know why things were that way before, but I'm told to set them that way again.
-echo 'Moving things around..'
-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/home /home
-echo 'Things moved.'
-
echo 'Adding TRC6500 public key to keyring..'
cat /media/cdrom/simple-cdd/TRC6500.pub | apt-key add -
echo 'Key added.'
-# 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 'Finalized.'
-
# our interfaces file gets written over for some reason, we'll copy it and restore it on first boot
# note : after install, we'll be executing our own rc.local on first boot
echo 'Placing first-boot script (/etc/rc.local)..'
echo 'Deleting simple-cdd files on disk..'
rm -r /usr/local/simple-cdd
-echo 'Script deleted'
+rm -r /etc/dpkg/dpkg.cfg.d/trc6500
+echo 'Files deleted'
umount /media/cdrom