mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Dennis Schridde <devurandom-hi6Y0CQ0nG0@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] usrmount should skip comments in fstab
Date: Sat, 25 Feb 2012 23:08:51 +0100	[thread overview]
Message-ID: <1715374.OIWgrar2Ec@ernie> (raw)


[-- 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 --]

             reply	other threads:[~2012-02-25 22:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25 22:08 Dennis Schridde [this message]
2012-02-28 18:05 ` [PATCH] usrmount should skip comments in fstab Dennis Schridde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1715374.OIWgrar2Ec@ernie \
    --to=devurandom-hi6y0cq0ng0@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox