aboutsummaryrefslogtreecommitdiffstats
path: root/setup-disk.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-30 12:57:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-30 12:57:59 +0000
commit841c6823ac8a3f1e17af457722c8b7ea2abf8cb4 (patch)
treecba956c81427d13e20dd99b5ee0f96274f6303f0 /setup-disk.in
parentf0f794a6fcc06cc8fd2b68fa8ce7900e1059453f (diff)
downloadalpine-conf-841c6823ac8a3f1e17af457722c8b7ea2abf8cb4.tar.bz2
alpine-conf-841c6823ac8a3f1e17af457722c8b7ea2abf8cb4.tar.xz
setup-disk: check if the devce itself is mounted
this will filter out loop0 device
Diffstat (limited to 'setup-disk.in')
-rw-r--r--setup-disk.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/setup-disk.in b/setup-disk.in
index 33cc868..c11d20c 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -149,6 +149,7 @@ has_mounted_part() {
# parse /proc/mounts for mounted devices
for p in $(awk '$1 ~ /^\/dev\// {gsub("/dev/", "", $1); print $1}' \
/proc/mounts); do
+ [ "$p" = "$1" ] && return 0
[ -e /sys/block/$1/$p ] && return 0
done
return 1