diff options
author | Will Woods <wwoods@redhat.com> | 2012-04-02 23:32:00 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2012-04-03 16:37:45 -0400 |
commit | 3a80062f5913012c8a642c4331fc593e09a0dd74 (patch) | |
tree | b7c4274540fe22e79aeb3b09fa466be6c68d0585 /dracut/anaconda-lib.sh | |
parent | b8e460e5d87512dee5727982295bb6fba3e2f99a (diff) | |
download | anaconda-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-x | dracut/anaconda-lib.sh | 8 |
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 $*" |