diff --git a/hooks/centos-4/90-make-fstab b/hooks/centos-4/90-make-fstab index 81201c7..097e0cc 100755 --- a/hooks/centos-4/90-make-fstab +++ b/hooks/centos-4/90-make-fstab @@ -34,13 +34,26 @@ logMessage Filesystem options are ${options} # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. # diff --git a/hooks/centos-5/90-make-fstab b/hooks/centos-5/90-make-fstab index 81201c7..7803ca4 100755 --- a/hooks/centos-5/90-make-fstab +++ b/hooks/centos-5/90-make-fstab @@ -33,14 +33,28 @@ logMessage Script $0 starting logMessage Filesystem options are ${options} + # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. # diff --git a/hooks/dapper/90-make-fstab b/hooks/dapper/90-make-fstab index 6131a52..285f030 100755 --- a/hooks/dapper/90-make-fstab +++ b/hooks/dapper/90-make-fstab @@ -31,13 +31,26 @@ logMessage Script $0 starting # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. # diff --git a/hooks/debian/90-make-fstab b/hooks/debian/90-make-fstab index a3c9fff..517a4ff 100755 --- a/hooks/debian/90-make-fstab +++ b/hooks/debian/90-make-fstab @@ -30,13 +30,26 @@ logMessage Script $0 starting # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. # diff --git a/hooks/edgy/90-make-fstab b/hooks/edgy/90-make-fstab index 6131a52..285f030 100755 --- a/hooks/edgy/90-make-fstab +++ b/hooks/edgy/90-make-fstab @@ -31,13 +31,26 @@ logMessage Script $0 starting # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. # diff --git a/hooks/fedora-core-6/90-make-fstab b/hooks/fedora-core-6/90-make-fstab index 81201c7..097e0cc 100755 --- a/hooks/fedora-core-6/90-make-fstab +++ b/hooks/fedora-core-6/90-make-fstab @@ -34,13 +34,26 @@ logMessage Filesystem options are ${options} # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. # diff --git a/hooks/gentoo/90-make-fstab b/hooks/gentoo/90-make-fstab index 1c5d5f7..b7d5eeb 100755 --- a/hooks/gentoo/90-make-fstab +++ b/hooks/gentoo/90-make-fstab @@ -31,13 +31,26 @@ logMessage Script $0 starting # -# Make sure we use ide style device names if required +# Find the root device. +# +# 1. default to sda. +# +# 2. If --ide is specified use hda. +# +# 3. Otherwise use a named $disk_device # device=sda if [ "${ide}" ]; then device=hda +else + if [ ! -z "${disk_device}" ]; then + device=`basename $disk_device` + fi fi +logMessage "Root device is /dev/$device" + + # # Now we have the options we can create the fstab. #