Don't mount on exit

This commit is contained in:
Christopher Laprise 2018-04-03 16:49:45 -04:00
parent fce9e8ea04
commit 2139bedb42
No known key found for this signature in database
GPG Key ID: 448568C8B281C952

View File

@ -39,14 +39,13 @@ abort_startup() {
umount /dev/xvdb umount /dev/xvdb
mv -f /dev/xvdb /dev/badxvdb mv -f /dev/xvdb /dev/badxvdb
mount -o ro /dev/badxvdb $rw
truncate --size=500M /root/dev-xvdb truncate --size=500M /root/dev-xvdb
loop=`losetup --find --show /root/dev-xvdb` loop=`losetup --find --show /root/dev-xvdb`
mv -f $loop /dev/xvdb mv -f $loop /dev/xvdb
cat /etc/bashrc /etc/bash.bashrc >/etc/bashrc-insert cat /etc/bashrc /etc/bash.bashrc >/etc/bashrc-insert
echo "echo '** VM-BOOT-PROTECT SERVICE SHELL'" >/etc/bashrc echo "echo '** VM-BOOT-PROTECT SERVICE SHELL'" >/etc/bashrc
echo "echo '** Private volume is located at' $rw" >>/etc/bashrc echo "echo '** Private volume is located at /dev/badxvdb'" >>/etc/bashrc
echo "cat $errlog" >>/etc/bashrc echo "cat $errlog" >>/etc/bashrc
echo ". /etc/bashrc-insert" >>/etc/bashrc echo ". /etc/bashrc-insert" >>/etc/bashrc
ln -f /etc/bashrc /etc/bash.bashrc ln -f /etc/bashrc /etc/bash.bashrc