Merge remote-tracking branch 'flapflap/de-network_configuration'
[tails-test.git] / config / chroot_local-includes / usr / local / bin / tails-get-bootinfo
blobf96bafa5398706fb583f584939b6289a45d1ece7
1 #!/bin/sh
3 LIVE_IMAGE_MOUNTPOINT=/lib/live/mount/medium
4 for arg in $(cat /proc/cmdline) ; do
5 case "$arg" in
6 BOOT_IMAGE=*)
7 kernel="${arg#BOOT_IMAGE=}"
8 ;;
9 initrd=*)
10 initrd="${arg#initrd=}"
12 esac
13 done
15 # Sanity checks
16 [ -n "$kernel" ] || exit 4
17 [ -n "$initrd" ] || exit 5
19 case "$1" in
20 kernel)
21 echo "${LIVE_IMAGE_MOUNTPOINT}${kernel}"
23 initrd)
24 echo "${LIVE_IMAGE_MOUNTPOINT}${initrd}"
27 echo "Usage: $0 kernel|initrd" >&2
28 exit 3
29 esac
31 exit 0