summaryrefslogtreecommitdiffstats
path: root/dracut/anaconda-lib.sh
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-04-02 23:32:00 -0400
committerWill Woods <wwoods@redhat.com>2012-04-03 16:37:45 -0400
commit3a80062f5913012c8a642c4331fc593e09a0dd74 (patch)
treeb7c4274540fe22e79aeb3b09fa466be6c68d0585 /dracut/anaconda-lib.sh
parentb8e460e5d87512dee5727982295bb6fba3e2f99a (diff)
downloadanaconda-3a80062f5913012c8a642c4331fc593e09a0dd74.tar.gz
anaconda-3a80062f5913012c8a642c4331fc593e09a0dd74.tar.xz
anaconda-3a80062f5913012c8a642c4331fc593e09a0dd74.zip
Fix kickstart failure if ks is on the same disk as stage2
Not too hard really - just check to see if the disk is already mounted, and don't bother mounting it again if it is.
Diffstat (limited to 'dracut/anaconda-lib.sh')
-rwxr-xr-xdracut/anaconda-lib.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index 59ee06bb9..c46955596 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -80,6 +80,14 @@ disk_to_dev_path() {
esac
}
+dev_is_mounted() {
+ local dev mnt etc
+ while read dev mnt etc; do
+ [ "$dev" = "$1" ] && echo $mnt && return 0
+ done < /proc/mounts
+ return 1
+}
+
when_diskdev_appears() {
local dev="${1#/dev/}" cmd=""; shift
cmd="/sbin/initqueue --settled --onetime --unique --name $1-$dev $*"