Sha256: 62554293031cd39ec3cd99f12bac6741f41351442e65938611c9f805bf89f0b8
Contents?: true
Size: 810 Bytes
Versions: 6
Compression:
Stored size: 810 Bytes
Contents
#!/bin/sh -x get_fstype() { # udev >=146-1 no longer provides vol_id: if [ -x /lib/udev/vol_id ] then /lib/udev/vol_id -t ${1} 2>/dev/null else eval $(blkid -o udev "${1}") if [ -n "$ID_FS_TYPE" ] then echo "${ID_FS_TYPE}" fi fi } list_devices() { # list partitions first (ls /dev/hd*[1-9] /dev/sd*[1-9] /dev/sr[0-9]; ls /dev/hd[a-z] /dev/sd[a-z]) 2> /dev/null } mkdir /boot for device in `list_devices`; do fs_type=`get_fstype ${device}` echo "check if $device ($fs_type) is the boot image" case $fs_type in ext3|iso9660) mount -r -t $fs_type $device /boot if [ -f "/boot/config.pp" ]; then exit 0 else umount /boot fi ;; esac done echo "no image found" exit 1
Version data entries
6 entries across 6 versions & 1 rubygems