All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usrmount should skip comments in fstab
@ 2012-02-25 22:08 Dennis Schridde
  2012-02-28 18:05 ` Dennis Schridde
  0 siblings, 1 reply; 2+ messages in thread
From: Dennis Schridde @ 2012-02-25 22:08 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 292 bytes --]

Hi!

Currently usrmount chokes on fstab lines like:
#... /usr ...
It will try to mount "#...", which obviously is wrong.

Attached patch fixes this by skipping over lines beginning with "#". It still 
does not handle cases like " #...", but is enough to work in my case.

Kind regards,
Dennis

[-- Attachment #1.2: dracut-usrmount-comments.patch --]
[-- Type: text/x-patch, Size: 489 bytes --]

--- /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh.orig	2012-02-25 22:40:15.122000048 +0100
+++ /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh	2012-02-25 23:00:24.452698091 +0100
@@ -10,6 +10,7 @@
     local _dev _mp _fs _opts _rest _usr_found _ret
     # check, if we have to mount the /usr filesystem
     while read _dev _mp _fs _opts _rest; do
+		[ "$_dev" = "${_dev###}" ] || continue
         if [ "$_mp" = "/usr" ]; then
             case "$_dev" in
                 LABEL=*)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2012-02-28 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-25 22:08 [PATCH] usrmount should skip comments in fstab Dennis Schridde
2012-02-28 18:05 ` Dennis Schridde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.