Ubuntu Pastebin

Paste from Oliver Grawert at Mon, 14 Dec 2015 10:10:54 +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
55
56
57
ogra@styx:~/Devel/packages/livecd-rootfs-2.301~ppa55$ cat live-build/ubuntu-core/hooks/08-etc-writable.chroot 
#!/bin/sh
set -e

mkdir -p /etc/writable/default

# cloud-init needs to be able to modify hostname and has the ability to
# set the other two.
for f in timezone localtime hostname watchdog.conf; do
    if [ -e /etc/$f ]; then
        echo "I: Moving /etc/$f to /etc/writable/"
        mv /etc/$f /etc/writable/$f
    fi
    echo "I: Linking /etc/$f to /etc/writable/"
    ln -s writable/$f /etc/$f
done

# do the same for /etc/default files
for f in watchdog; do
    if [ -e /etc/default/$f ]; then
        echo "I: Moving /etc/default/$f to /etc/writable/default"
        mv /etc/default/$f /etc/writable/default/$f
    fi
    echo "I: Linking /etc/default/$f to /etc/writable/default"
    ln -s /etc/writable/default/$f /etc/default/$f
done

ogra@styx:~/Devel/packages/livecd-rootfs-2.301~ppa55$
ogra@styx:~/Devel/packages/livecd-rootfs-2.301~ppa55$ cd ../../branches/livecd-rootfs
ogra@styx:~/Devel/branches/livecd-rootfs$ cat live-build/ubuntu-core/hooks/08-etc-writable.chroot 
#!/bin/sh
set -e

mkdir -p /etc/writable/default

# cloud-init needs to be able to modify hostname and has the ability to
# set the other two.
for f in timezone localtime hostname watchdog.conf; do
    if [ -e /etc/$f ]; then
        echo "I: Moving /etc/$f to /etc/writable/"
        mv /etc/$f /etc/writable/$f
    fi
    echo "I: Linking /etc/$f to /etc/writable/"
    ln -s writable/$f /etc/$f
done

# do the same for /etc/default files
for f in watchdog; do
    if [ -e /etc/default/$f ]; then
        echo "I: Moving /etc/default/$f to /etc/writable/default"
        mv /etc/default/$f /etc/writable/default/$f
    fi
    echo "I: Linking /etc/default/$f to /etc/writable/default"
    ln -s /etc/writable/default/$f /etc/default/$f
done

ogra@styx:~/Devel/branches/livecd-rootfs$
Download as text