From 5e2b0812464c6d986ad60626e330ac87745e1306 Mon Sep 17 00:00:00 2001 From: Ray Tanaka Date: Wed, 31 Oct 2018 00:25:45 -0700 Subject: [PATCH] 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 --- setup/pi/make-root-fs-readonly.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/setup/pi/make-root-fs-readonly.sh b/setup/pi/make-root-fs-readonly.sh index aeafeb0..ea88422 100644 --- a/setup/pi/make-root-fs-readonly.sh +++ b/setup/pi/make-root-fs-readonly.sh @@ -33,25 +33,19 @@ if [ ! -e "/mutable/etc" ] then mkdir -p /mutable/etc fi -if [ -e "/etc/fake-hwclock.data" ] + +if [ ! -L "/etc/fake-hwclock.data" ] && [ -e "/etc/fake-hwclock.data" ] then echo "Moving fake-hwclock data" - cp /etc/fake-hwclock.data /mutable/etc/fake-hwclock.data - rm /etc/fake-hwclock.data + mv /etc/fake-hwclock.data /mutable/etc/fake-hwclock.data ln -s /mutable/etc/fake-hwclock.data /etc/fake-hwclock.data 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" ] then mkdir -p /mutable/configs 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 rm -rf /var/spool