aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-setup-disk-check-if-the-devce-itself-is-mounted.patch
blob: 28050509f82b397622cf22103d7c4d635d1ee965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 841c6823ac8a3f1e17af457722c8b7ea2abf8cb4 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 30 Sep 2009 12:57:59 +0000
Subject: [PATCH] setup-disk: check if the devce itself is mounted

this will filter out loop0 device
---
 setup-disk.in |    1 +
 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
-- 
1.6.4.4