You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-core/hooks/08-etc-writable.chroot

27 lines
744 B

#!/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