Merge branch 'debian'
[live-boot-grml.git] / debian / patches / stop-using-etc-fstab.d.patch
1 From f587cb900b3100f31d379f3f9e1b60521c5ebc69 Mon Sep 17 00:00:00 2001
2 From: Daniel Baumann <mail@daniel-baumann.ch>
3 Date: Mon, 10 Nov 2014 14:18:04 +0100
4 Subject: [PATCH] Dropping usage of /etc/fstab.d since util-linux removed it,
5  thanks to Evgeni Golov <evgeni+git@golov.de> for reporting it.
6
7 ---
8  components/3020-swap     | 8 ++++----
9  components/9990-fstab.sh | 8 ++++----
10  2 files changed, 8 insertions(+), 8 deletions(-)
11
12 diff --git a/components/3020-swap b/components/3020-swap
13 index a1bcdbe..345b9a0 100755
14 --- a/components/3020-swap
15 +++ b/components/3020-swap
16 @@ -48,15 +48,15 @@ Swap ()
17         done
18  
19         # Remove all auto swap entries
20 -       if grep -qs "swap swap" /root/etc/fstab.d/swap
21 +       if grep -qs "swap swap" /root/etc/fstab
22         then
23 -               grep -v "swap swap" /root/etc/fstab.d/swap > /root/etc/fstab.d/swap.tmp
24 -               mv /root/etc/fstab.d/swap.tmp /root/etc/fstab.d/swap
25 +               grep -v "swap swap" /root/etc/fstab > /root/etc/fstab.tmp
26 +               mv /root/etc/fstab.tmp /root/etc/fstab
27         fi
28  
29         # Add new swap entries
30         for _DEVICE in ${_SWAP_DEVICES}
31         do
32 -               echo "${_DEVICE} swap swap defaults 0 0" >> /root/etc/fstab.d/swap
33 +               echo "${_DEVICE} swap swap defaults 0 0" >> /root/etc/fstab
34         done
35  }
36 diff --git a/components/9990-fstab.sh b/components/9990-fstab.sh
37 index 5ae9546..a8d9123 100755
38 --- a/components/9990-fstab.sh
39 +++ b/components/9990-fstab.sh
40 @@ -15,14 +15,14 @@ Fstab ()
41  
42         log_begin_msg "Configuring fstab"
43  
44 -       if ! grep -qs  "^${UNIONTYPE}" /root/etc/fstab.d/live
45 +       if ! grep -qs  "^${UNIONTYPE}" /root/etc/fstab
46         then
47 -               echo "${UNIONTYPE} / ${UNIONTYPE} rw 0 0" >> /root/etc/fstab.d/live
48 +               echo "${UNIONTYPE} / ${UNIONTYPE} rw 0 0" >> /root/etc/fstab
49         fi
50  
51 -       if ! grep -qs "^tmpfs /tmp" /root/etc/fstab.d/live
52 +       if ! grep -qs "^tmpfs /tmp" /root/etc/fstab
53         then
54 -               echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> /root/etc/fstab.d/live
55 +               echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> /root/etc/fstab
56         fi
57  
58         log_end_msg
59 -- 
60 2.1.3
61