Merge lp:~cwayne/livecd-rootfs/machine-info-writable into lp:livecd-rootfs

Proposed by Chris Wayne
Status: Merged
Approved by: Martin Pitt
Approved revision: 873
Merged at revision: 871
Proposed branch: lp:~cwayne/livecd-rootfs/machine-info-writable
Merge into: lp:livecd-rootfs
Diff against target: 14 lines (+2/-1)
1 file modified
live-build/ubuntu-touch/hooks/03-etc-writable.chroot (+2/-1)
To merge this branch: bzr merge lp:~cwayne/livecd-rootfs/machine-info-writable
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+201542@code.launchpad.net

Description of the change

Add hostname and machine-info to the writable paths, so that hostnamectl can change them to create a sane default bluetooth device name

To post a comment you must log in.
Revision history for this message
Chris Wayne (cwayne) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Looks good, thanks! But please note that other programs might try to change /etc/hostname as well, so these might need to get updated for /etc/writable/ too.

review: Approve
Revision history for this message
Martin Pitt (pitti) wrote :

Please don't touch all files like that if they don't exist, that could easily lead to bugs in the future when adding more files to it. I think it would be better to move the symlink creation out of the "if [ -e /etc/$f ]" check: i. e. always create the symlink, but only move existing files into /etc/writable/. Then we don't accidentally create files in /etc/writable/ which is hard to revert.

review: Needs Fixing
873. By Chris Wayne

only touch /etc/writable/machine-info

Revision history for this message
Martin Pitt (pitti) wrote :

Ack, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'live-build/ubuntu-touch/hooks/03-etc-writable.chroot'
2--- live-build/ubuntu-touch/hooks/03-etc-writable.chroot 2013-09-30 11:59:57 +0000
3+++ live-build/ubuntu-touch/hooks/03-etc-writable.chroot 2014-01-20 14:22:45 +0000
4@@ -3,8 +3,9 @@
5 set -x
6
7 mkdir -p /etc/writable
8+touch /etc/writable/machine-info
9
10-for f in timezone localtime; do
11+for f in timezone localtime machine-info hostname; do
12 if [ -e /etc/$f ]; then
13 echo "I: Moving /etc/$f to /etc/writable/"
14 mv /etc/$f /etc/writable/$f

Subscribers

People subscribed via source and target branches