Ubuntu Pastebin

Paste from martin at Wed, 20 Apr 2016 14:46:37 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff -Nru casper-1.375/debian/changelog casper-1.376/debian/changelog
--- casper-1.375/debian/changelog	2016-04-19 15:53:29.000000000 +0200
+++ casper-1.376/debian/changelog	2016-04-20 16:41:57.000000000 +0200
@@ -1,3 +1,17 @@
+casper (1.376) xenial; urgency=medium
+
+  * scripts/casper-bottom/13swap: Don't add detected swap partitions to the
+    live system's fstab, just swapon it. This avoids creating *.swap units for
+    those which automatically trigger whenever partman re-creates swap
+    partitions, as this races with partman's own swapon (while it's
+    indistinguishable from a hotplug/early boot event in systemd). By
+    disabling the fstab entries we disable that automatic start of swap
+    partitions, as a relatively unintrusive bandaid for the final release.
+    (LP: #1552539)
+  * hooks/casper: Copy swapon into the casper initrd for the above.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Wed, 20 Apr 2016 16:26:55 +0200
+
 casper (1.375) xenial; urgency=medium
 
   * scripts/casper-bottom/16disable_gpt_auto_mount: Disable systemd's GPT auto
diff -Nru casper-1.375/hooks/casper casper-1.376/hooks/casper
--- casper-1.375/hooks/casper	2012-12-03 15:33:08.000000000 +0100
+++ casper-1.376/hooks/casper	2016-04-20 16:41:32.000000000 +0200
@@ -40,6 +40,7 @@
 cp -p /lib/udev/rules.d/60-cdrom_id.rules ${DESTDIR}/lib/udev/rules.d/
 copy_exec /lib/udev/cdrom_id /lib/udev
 copy_exec /usr/bin/eject /bin
+copy_exec /sbin/swapon /sbin
 
 # cifs boot
 if [ -x /sbin/mount.cifs ]; then
diff -Nru casper-1.375/scripts/casper-bottom/13swap casper-1.376/scripts/casper-bottom/13swap
--- casper-1.375/scripts/casper-bottom/13swap	2013-04-25 12:00:34.000000000 +0200
+++ casper-1.376/scripts/casper-bottom/13swap	2016-04-20 16:26:47.000000000 +0200
@@ -2,7 +2,6 @@
 
 PREREQ=""
 DESCRIPTION="Setting up swap..."
-FSTAB=/root/etc/fstab
 
 prereqs()
 {
@@ -38,9 +37,7 @@
 done
 
 for device in $devices; do
-    cat >> $FSTAB <<EOF
-$device swap swap defaults 0 0
-EOF
+    swapon $device || true
 done
 
 log_end_msg
Download as text