From 08ec2265b6f331babed01d8a8acd5294ee7efa7d Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 4 Sep 2007 21:03:21 +0000 Subject: [PATCH] 2007-09-04 21:03:19 by steve Updated to allow the user to specify 'disk_device' --- hooks/centos-4/90-make-fstab | 15 ++++++++++++++- hooks/centos-5/90-make-fstab | 16 +++++++++++++++- hooks/dapper/90-make-fstab | 15 ++++++++++++++- hooks/debian/90-make-fstab | 15 ++++++++++++++- hooks/edgy/90-make-fstab | 15 ++++++++++++++- hooks/fedora-core-6/90-make-fstab | 15 ++++++++++++++- hooks/gentoo/90-make-fstab | 15 ++++++++++++++- 7 files changed, 99 insertions(+), 7 deletions(-) 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. #