mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH 2/2 v2] use lib function ismounted in convertfs module
@ 2012-09-17 10:01 Dave Young
       [not found] ` <20120917100110.GA18642-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Young @ 2012-09-17 10:01 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA, harald-H+wXaHxf7aLQT0dZR+AlfA,
	vgoyal-H+wXaHxf7aLQT0dZR+AlfA, chaowang-H+wXaHxf7aLQT0dZR+AlfA,
	kzak-H+wXaHxf7aLQT0dZR+AlfA


convertfs module use a private function of ismounted(), this is
duplicate of the one in dracut-lib.sh.

Change to use global ismounted

Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 modules.d/30convertfs/convertfs.sh |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

--- dracut.orig/modules.d/30convertfs/convertfs.sh
+++ dracut/modules.d/30convertfs/convertfs.sh
@@ -9,6 +9,8 @@ if [[ ! -d "$ROOT" ]]; then
     exit 1
 fi
 
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+
 if [[ "$ROOT" -ef / ]]; then
     echo "Can't convert the running system."
     echo "Please boot with 'rd.convertfs' on the kernel command line,"
@@ -73,13 +75,6 @@ if [[ ! -e "$testfile" ]]; then
 fi
 rm -f "$testfile"
 
-ismounted() {
-    while read a m a; do
-        [[ "$m" = "$1" ]] && return 0
-    done < /proc/mounts
-    return 1
-}
-
 # clean up after ourselves no matter how we die.
 cleanup() {
     echo "Something failed. Move back to the original state"

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-20  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 10:01 [PATCH 2/2 v2] use lib function ismounted in convertfs module Dave Young
     [not found] ` <20120917100110.GA18642-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2012-09-20  8:38   ` Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox