diff options
Diffstat (limited to 'initramfs-tools/scripts')
| -rwxr-xr-x | initramfs-tools/scripts/live-premount/readonly | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/initramfs-tools/scripts/live-premount/readonly b/initramfs-tools/scripts/live-premount/readonly deleted file mode 100755 index 71483bd..0000000 --- a/initramfs-tools/scripts/live-premount/readonly +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="udev" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-boot script - -# make sure all harddisk devices are read-only -# this is important for forensic investigations -if grep -qe forensic -qe readonly /proc/cmdline -then - for device in /dev/hd* /dev/sd* /dev/vd* - do - if [ -b "$device" ] - then - printf " * Setting device %-9s to read-only mode: " $device >/dev/console - blockdev --setro $device && printf "done [ execute \"blockdev --setrw %-9s\" to unlock]\n" $device >/dev/console || printf "failed\n" >/dev/console - fi - done -fi |
