Commit Diff
Diff:
b3c663cae2f4de0f7c184648b14630f2d881dd32
73c41ed50b4406a061236f95f793fead3ed0ae5a
Commit:
73c41ed50b4406a061236f95f793fead3ed0ae5a
Tree:
dcac9e3d0ad3828486cf0e6f09d108cac7258b71
Author:
Fred. Galusik <f@galusik.xyz>
Committer:
Fred. Galusik <f@galusik.xyz>
Date:
Sun May 17 19:02:23 2015 UTC
Message:
add revert option
blob - 4e8f30fc6b2cc46e0193a5c204bf32a9a51aebeb
blob + 5a4febb7623d2c604c5bed2e4d2fa33bdef18f29
--- snaps
+++ snaps
@@ -55,7 +55,7 @@ SHAF=SHA256
SIGF=SHA256.sig
SIGNPUB=/etc/signify/openbsd-$RL-base.pub
-GET='ftp -m -C'
+GET='ftp -n -m -C'
REBOOT='/sbin/reboot'
LOGF=/var/log/snaps.log
@@ -91,6 +91,7 @@ get_log() {
fi
}
+
get_rd() {
echo "\n=== FETCHING FILES ==="
for _i in $BSDRD $SHAF $SIGF; do
@@ -138,18 +139,31 @@ s_move() {
echo "If something goes wrong, you can still boot your old kernel"
echo "Just type bsd.o at the boot prompt"
echo ""
- echo -n "==> Do you want to do it now ? (y/n)"
+ echo -n "==> Do you want to do it now ? (y/n) "
read _a
case ${_a} in
y|Y)
- echo "After upgrade, don't forget to run sysmerge(8)"
+ echo "After the upgrade, run sysmerge(8)"
echo "Then, update packages or ports"
echo "==> Rebooting..."
$REBOOT
;;
*)
- echo "==> Aborting (new bsd.rd is still installed)"
- exit
+ echo -n "Do you want to put the old bsd.rd back ? (y/n) "
+ read _b
+ case ${_b} in
+ y|Y)
+ rm /bsd.rd || exit 1
+ rm /bsd.o || exit 1
+ mv /bsd.o.rd /bsd.rd || exit 1
+ echo "Done!"
+ exit 1
+ ;;
+ *)
+ echo "Aborting..."
+ exit 1
+ ;;
+ esac
;;
esac
}
Frédéric Galusik