~ubuntu-core-dev/livecd-rootfs/trunk

« back to all changes in this revision

Viewing changes to live-build/ubuntu-core/hooks/08-etc-writable.chroot

  • Committer: Balint Reczey
  • Date: 2019-01-31 08:14:49 UTC
  • Revision ID: balint.reczey@canonical.com-20190131081449-ptfnz0r4c2emh0nt
Moved to git at https://git.launchpad.net/livecd-rootfs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
set -e
3
 
 
4
 
mkdir -p /etc/writable/default
5
 
 
6
 
# cloud-init needs to be able to modify hostname and has the ability to
7
 
# set the other two.
8
 
for f in timezone localtime hostname watchdog.conf; do
9
 
    if [ -e /etc/$f ]; then
10
 
        echo "I: Moving /etc/$f to /etc/writable/"
11
 
        mv /etc/$f /etc/writable/$f
12
 
    fi
13
 
    echo "I: Linking /etc/$f to /etc/writable/"
14
 
    ln -s writable/$f /etc/$f
15
 
done
16
 
 
17
 
# do the same for /etc/default files
18
 
for f in watchdog; do
19
 
    if [ -e /etc/default/$f ]; then
20
 
        echo "I: Moving /etc/default/$f to /etc/writable/default"
21
 
        mv /etc/default/$f /etc/writable/default/$f
22
 
    fi
23
 
    echo "I: Linking /etc/default/$f to /etc/writable/default"
24
 
    ln -s /etc/writable/default/$f /etc/default/$f
25
 
done
26