summaryrefslogtreecommitdiffstats
path: root/rescue/tree/usr/lib
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/tree/usr/lib')
-rw-r--r--rescue/tree/usr/lib/CVS.0
-rw-r--r--rescue/tree/usr/lib/modules-load.d/mageia-rescue.conf17
-rwxr-xr-xrescue/tree/usr/lib/restore-image-lib.sh80
-rw-r--r--rescue/tree/usr/lib/systemd/system/rescue.service20
-rw-r--r--rescue/tree/usr/lib/systemd/system/systemd-udevd.service.d/dracut-rules.conf1
5 files changed, 118 insertions, 0 deletions
diff --git a/rescue/tree/usr/lib/CVS. b/rescue/tree/usr/lib/CVS.
deleted file mode 100644
index e69de29bb..000000000
--- a/rescue/tree/usr/lib/CVS.
+++ /dev/null
diff --git a/rescue/tree/usr/lib/modules-load.d/mageia-rescue.conf b/rescue/tree/usr/lib/modules-load.d/mageia-rescue.conf
new file mode 100644
index 000000000..4111c0484
--- /dev/null
+++ b/rescue/tree/usr/lib/modules-load.d/mageia-rescue.conf
@@ -0,0 +1,17 @@
+ide-gd_mod
+ide-cd_mod
+floppy
+af_packet
+isofs
+vfat
+ext3
+ext4
+reiserfs
+nilfs2
+btrfs
+xfs
+jfs
+loop
+fuse
+sd_mod
+sr_mod
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
+}
+
diff --git a/rescue/tree/usr/lib/systemd/system/rescue.service b/rescue/tree/usr/lib/systemd/system/rescue.service
new file mode 100644
index 000000000..336e06c22
--- /dev/null
+++ b/rescue/tree/usr/lib/systemd/system/rescue.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Mageia Rescue
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=sysinit.target plymouth-start.service
+Before=shutdown.target
+
+[Service]
+Environment=HOME=/
+WorkingDirectory=/
+ExecStartPre=-/bin/plymouth quit
+ExecStart=/usr/bin/mageia-rescue
+ExecStopPost=-/usr/bin/systemctl --fail --no-block reboot
+Type=idle
+StandardInput=tty-force
+StandardOutput=inherit
+StandardError=inherit
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
diff --git a/rescue/tree/usr/lib/systemd/system/systemd-udevd.service.d/dracut-rules.conf b/rescue/tree/usr/lib/systemd/system/systemd-udevd.service.d/dracut-rules.conf
new file mode 100644
index 000000000..b75df2e4e
--- /dev/null
+++ b/rescue/tree/usr/lib/systemd/system/systemd-udevd.service.d/dracut-rules.conf
@@ -0,0 +1 @@
+ExecStartPre=-/usr/bin/rm -f /etc/udev/rules.d/10-console.rules