tag 643160 patch
thanks

patch attached.

-- 
Address:        Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:          daniel.baum...@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/
>From 17c8065d001e13feee2d7803f30cc4e3d350a61a Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baum...@progress-technologies.net>
Date: Mon, 26 Sep 2011 22:38:19 +0200
Subject: [PATCH] Adding patch to silence grep calls in initramfs-tools hook
 for not necessarily existing /etc/fstab (Closes: #643160).

---
 debian/patches/grep_fstab |   20 ++++++++++++++++++++
 debian/patches/series     |    1 +
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/grep_fstab

diff --git a/debian/patches/grep_fstab b/debian/patches/grep_fstab
new file mode 100644
index 0000000..5c01587
--- /dev/null
+++ b/debian/patches/grep_fstab
@@ -0,0 +1,20 @@
+Author: Daniel Baumann <daniel.baum...@progress-technologies.net>
+Description:
+ Silence grep calls in initramfs-tools hook for not necessarily existing
+ /etc/fstab (Closes: #643160).
+
+diff -Naurp udev.orig/extra/initramfs.hook udev/extra/initramfs.hook
+--- udev.orig/extra/initramfs.hook	2011-09-26 22:47:42.179289381 +0200
++++ udev/extra/initramfs.hook	2011-09-26 22:47:03.563095393 +0200
+@@ -12,9 +12,9 @@ case "$1" in
+ esac
+ 
+ root_over_the_network() {
+-  if   egrep -q '^/dev/(nbd|nd[a-z]|etherd/e)[^[:space:]]+[[:space:]]+/[[:space:]]' /etc/fstab; then
++  if   egrep -qs '^/dev/(nbd|nd[a-z]|etherd/e)[^[:space:]]+[[:space:]]+/[[:space:]]' /etc/fstab; then
+     return 0
+-  elif egrep -q '^[^[:space:]#]+[[:space:]]+/[[:space:]]+nfs[234]?[[:space:]]' /etc/fstab; then
++  elif egrep -qs '^[^[:space:]#]+[[:space:]]+/[[:space:]]+nfs[234]?[[:space:]]' /etc/fstab; then
+     return 0
+   fi
+   return 1 # false
diff --git a/debian/patches/series b/debian/patches/series
index 5c67dca..3d95f27 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,3 +21,4 @@ dont-build-some-helpers
 rules_compat_qemu
 use_run_tmpfs
 dev_root_rule
+grep_fstab
-- 
1.7.6

Reply via email to