X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=simple-cdd%2Fprofiles%2Ftrc6500.postinst;h=43bb17857bf44ab4bc6394149adeb96df978884b;hb=6c7cd2221dcfed292d2b89d1c18d739323fc2a45;hp=0ad5d6033935beda7368aa64da05294613e6d3e1;hpb=9c7f26beb3643499203fca3668ba7024e6823af4;p=debian6500.git diff --git a/simple-cdd/profiles/trc6500.postinst b/simple-cdd/profiles/trc6500.postinst index 0ad5d60..43bb178 100755 --- a/simple-cdd/profiles/trc6500.postinst +++ b/simple-cdd/profiles/trc6500.postinst @@ -3,67 +3,47 @@ # 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 # first we install the packages we couldn't install automatically -echo 'Installing additional package : firmware-bnx2..' +echo 'Installing additional package : firmware-bnx2...' dpkg -i /media/cdrom/simple-cdd/firmware-bnx2_0.36+wheezy.1_all.deb -echo 'Additional packages installed.' +echo 'Additional packages installed' -# 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 / -echo 'Files unpacked.' +#debugging +echo 'force-confnew' > /etc/dpkg/dpkg.cfg.d/trc6500 -# 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.' +# now we unpack our master archive and replace all those conf files and scripts and things +echo 'Unpacking master config files...' +dpkg -i /media/cdrom/simple-cdd/trc6500-master-file* # version-proof +echo 'Files unpacked' -echo 'Adding TRC6500 public key to keyring..' +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.' +echo 'Key added' -# 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.' +echo 'Removing exim packages...' +dpkg -l | awk '/exim/ {print $2}' | xargs dpkg --remove bsd-mailx +find /media/cdrom0 -name libgnutls-openssl\*_\* -o -name ssmtp_\* -o -name bsd-mailx_\* | xargs dpkg --install +echo 'Exim remove # 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 'Copying first-boot script (/etc/rc.local)...' cp /etc/network/interfaces /etc/network/interfaces.original mv /etc/rc.local /etc/rc.local.original cp /media/cdrom/simple-cdd/myrc.local /etc/rc.local -echo 'Script copied.' +echo 'Script copied' +echo 'Deleting simple-cdd files on disk...' +rm -r /usr/local/simple-cdd +rm -r /etc/dpkg/dpkg.cfg.d/trc6500 +echo 'Files deleted' +echo 'Umount cdrom' umount /media/cdrom + +exit 0