tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit aefbd22b82b8a6bf263b03c6fd721d0f749a4ef7
parent d5b3bc1bca752314f40339b13172940968c82e1c
Author: rob <rob@tarina.org>
Date:   Mon,  3 Jun 2019 15:50:04 +0300

Merge branch 'master' of https://github.com/rbckman/tarina
ok

Diffstat:
Aextras/restorebak.sh | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/extras/restorebak.sh b/extras/restorebak.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +ROOT_UID=0 # Root has $UID 0. + +if [ "$UID" -eq "$ROOT_UID" ] +then + echo "OK" +else + echo "Run with sudo!" + echo "sudo ./restorebak.sh" + exit 0 +fi + +while true; do + read -p "Undo rpi-update? [y]es or [n]o?" yn + case $yn in + [Yy]* ) echo "Restoring from backup now..." +cp -r /boot.bak/* /boot/ +cp -r /lib/modules.bak/* /lib/modules/ + break;; + [Nn]* ) echo "Yes, sir! we are done!";break;; + * ) echo "Please answer yes or no.";; + esac +done +