summaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-lbu-fix-the-way-we-check-if-a-dir-is-mounted-or-not.patch
blob: 858c3b816d09a3f6f31527cdd93e8e1ed26cf7c1 (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
26
27
From dedf250425d3cb082cae9f0005d94fbc01e1e953 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 11 Jan 2010 20:56:02 +0000
Subject: [PATCH] lbu: fix the way we check if a dir is mounted or not

this works around an issue when lbu wrongly assumes /media/usb is
mounted when /media/usbdisk is.
---
 lbu.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lbu.in b/lbu.in
index 7709567..da8ba86 100644
--- a/lbu.in
+++ b/lbu.in
@@ -65,7 +65,7 @@ exit_clean() {
 }
 
 mount_once() {
-	if ! grep $1 /proc/mounts >/dev/null; then
+	if awk "\$2 == \"$1\" {exit 1}" /proc/mounts; then
 		mount $1 && UMOUNT_LIST="$1 $UMOUNT_LIST"
 	fi
 }
-- 
1.6.6