diff options
author | Colin Guthrie <colin@mageia.org> | 2013-12-02 23:40:22 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-12-07 18:32:06 +0000 |
commit | e7aedc3aa7e08f3337c86085c6da10ca83445024 (patch) | |
tree | 4005be196198d60c655e345d43fef926bbac6702 /rescue/tree/usr/lib/restore-image-lib.sh | |
parent | 2ad4c4fc0b990dd0db23cdee815ac2a13c60929d (diff) | |
download | drakx-e7aedc3aa7e08f3337c86085c6da10ca83445024.tar drakx-e7aedc3aa7e08f3337c86085c6da10ca83445024.tar.gz drakx-e7aedc3aa7e08f3337c86085c6da10ca83445024.tar.bz2 drakx-e7aedc3aa7e08f3337c86085c6da10ca83445024.tar.xz drakx-e7aedc3aa7e08f3337c86085c6da10ca83445024.zip |
rescue: Move files around and introduce proper dep tracking.
This moves any perl files into bin and sbin folders which will be directly installed
in /usr/bin and /usr/sbin. This is done such that the extract modes in list.xml still
work and the files end up in the right places.
All other files have been moved into the tree folder in their final destination.
Diffstat (limited to 'rescue/tree/usr/lib/restore-image-lib.sh')
-rwxr-xr-x | rescue/tree/usr/lib/restore-image-lib.sh | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/rescue/tree/usr/lib/restore-image-lib.sh b/rescue/tree/usr/lib/restore-image-lib.sh new file mode 100755 index 000000000..3451f7be5 --- /dev/null +++ b/rescue/tree/usr/lib/restore-image-lib.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +TITLE="%s Installer" +BACKTITLE="%s" +MIN_DISKSIZE=5000000 + +debug="/dev/null" + +function _msgbox() +{ + dialog --timeout 60 --backtitle "$BACKTITLE" --title "$TITLE" --msgbox \ + "$1" 0 0 + + return $? +} + +function _infobox() +{ + dialog --backtitle "$BACKTITLE" --title "$TITLE" --sleep 2 \ + --infobox "$1" 0 0 + + return $? +} + +function _yesno() +{ + dialog --backtitle "$BACKTITLE" --title "$TITLE" \ + --yes-label "Yes" --no-label "No" --yesno "$1" 0 0 + + return $? +} + +function _mount() +{ + mount $1 $2 > $debug 2>&1 + + return $? +} + +function _umount() +{ + umount $1 > $debug 2>&1 + + return $? +} + +function _bind() +{ + mount --bind $1 $2 > $debug 2>&1 + + return $? +} + +function _eject() +{ + eject $1 > $debug 2>&1 + + return $? +} + +function _shutdown() +{ + [ -e /tmp/no-shutdown ] && exit + clear + sync + echo s > /proc/sysrq-trigger + echo o > /proc/sysrq-trigger + exit +} + +function _reboot() +{ + [ -e /tmp/no-shutdown ] && exit + clear + sync + echo s > /proc/sysrq-trigger + echo b > /proc/sysrq-trigger + exit +} + |