only move fake-hwclock.data if it's not already a symlink

take out rclone specific logic out of here and move into rclone_archive
This commit is contained in:
Ray Tanaka
2018-10-31 00:25:45 -07:00
parent d908f7caed
commit 5e2b081246

View File

@@ -33,25 +33,19 @@ if [ ! -e "/mutable/etc" ]
then then
mkdir -p /mutable/etc mkdir -p /mutable/etc
fi fi
if [ -e "/etc/fake-hwclock.data" ]
if [ ! -L "/etc/fake-hwclock.data" ] && [ -e "/etc/fake-hwclock.data" ]
then then
echo "Moving fake-hwclock data" echo "Moving fake-hwclock data"
cp /etc/fake-hwclock.data /mutable/etc/fake-hwclock.data mv /etc/fake-hwclock.data /mutable/etc/fake-hwclock.data
rm /etc/fake-hwclock.data
ln -s /mutable/etc/fake-hwclock.data /etc/fake-hwclock.data ln -s /mutable/etc/fake-hwclock.data /etc/fake-hwclock.data
fi fi
# Move rclone configs if it exists so we can write to it # Create a configs directory for others to use
if [ ! -e "/mutable/configs" ] if [ ! -e "/mutable/configs" ]
then then
mkdir -p /mutable/configs mkdir -p /mutable/configs
fi fi
if [ -e "/root/.config/rclone/rclone.conf" ]
then
echo "Moving rclone configs"
mv /root/.config/rclone /mutable/configs
ln -s /mutable/configs/rclone /root/.config/rclone
fi
# Move /var/spool to /tmp # Move /var/spool to /tmp
rm -rf /var/spool rm -rf /var/spool