summaryrefslogtreecommitdiff
path: root/initrd-tools
diff options
context:
space:
mode:
Diffstat (limited to 'initrd-tools')
-rw-r--r--initrd-tools/initrd.usbinit6
-rwxr-xr-xinitrd-tools/usbstick23
2 files changed, 29 insertions, 0 deletions
diff --git a/initrd-tools/initrd.usbinit b/initrd-tools/initrd.usbinit
new file mode 100644
index 0000000..9d7199d
--- /dev/null
+++ b/initrd-tools/initrd.usbinit
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# /usr/local/share/initrd.usbinit
+#
+/bin/sleep 5
+/sbin/sfdisk -R /dev/sda || true
diff --git a/initrd-tools/usbstick b/initrd-tools/usbstick
new file mode 100755
index 0000000..c342f6a
--- /dev/null
+++ b/initrd-tools/usbstick
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# /usr/share/initrd-tools/scripts/usbstick
+#
+cp /usr/local/share/initrd.usbinit \
+ $INITRDDIR/scripts/usbinit.sh
+cp /sbin/sfdisk $INITRDDIR/sbin
+cp /bin/sleep $INITRDDIR/bin/sleep
+
+case "$VERSION" in
+ 2.4.*)
+ LD_ASSUME_KERNEL=2.4
+ export LD_ASSUME_KERNEL
+ ;;
+esac
+
+PROGS="/sbin/sfdisk /bin/sleep"
+LIBS=`ldd $PROGS | awk '{print $3}' | sort -u`
+for i in $LIBS
+do
+ mkdir -p `dirname $INITRDDIR/$i`
+ cp $i $INITRDDIR/$i
+done