From 6627b99d730d61b48a107f066532b4e18e760025 Mon Sep 17 00:00:00 2001 From: James Hunt Date: Tue, 5 Aug 2014 09:22:45 +0100 Subject: [PATCH 1/2] * More haste, less speed: - Perform in-place edit. - Allow variable expansion. --- live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot index d8f4c7db..7ae143a4 100755 --- a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot +++ b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot @@ -3,7 +3,7 @@ # Boot using systemd and disable quiet boot # to see what is happening. systemd=/lib/systemd/systemd -sed \ - -e 's,^\([ ]*GRUB_CMDLINE_LINUX\)=""$,\1="init=$systemd",g' \ - -e 's,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)="quiet splash",\1="",g' \ +sed -i \ + -e "s,^\([ ]*GRUB_CMDLINE_LINUX\)=\"\"$,\1=\"init=$systemd\",g" \ + -e "s,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)=\"quiet splash\",\1=\"\",g" \ /etc/default/grub From f447fd56ed73badfcb553835591a10d7bc64d5a7 Mon Sep 17 00:00:00 2001 From: James Hunt Date: Tue, 5 Aug 2014 09:37:32 +0100 Subject: [PATCH 2/2] * Tweaks based on review comments. --- live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot index 7ae143a4..563af73e 100755 --- a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot +++ b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot @@ -4,6 +4,6 @@ # to see what is happening. systemd=/lib/systemd/systemd sed -i \ - -e "s,^\([ ]*GRUB_CMDLINE_LINUX\)=\"\"$,\1=\"init=$systemd\",g" \ - -e "s,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)=\"quiet splash\",\1=\"\",g" \ + -e "s,^\\([ ]*GRUB_CMDLINE_LINUX\\)=\"\"$,\\1=\"init=$systemd\",g" \ + -e 's,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)="quiet splash",\1="",g' \ /etc/default/grub