From 642f90c695603205aef94bf9213e23dee85eb2cc Mon Sep 17 00:00:00 2001 From: nolim1t Date: Mon, 1 Jun 2020 00:20:58 +0700 Subject: [PATCH] Remove an if loop.. only need it --- stage2/01-sys-tweaks/files/rc.local | 41 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/stage2/01-sys-tweaks/files/rc.local b/stage2/01-sys-tweaks/files/rc.local index a7fc346..77cf085 100755 --- a/stage2/01-sys-tweaks/files/rc.local +++ b/stage2/01-sys-tweaks/files/rc.local @@ -57,28 +57,27 @@ if [ ! -f /home/umbrel/statuses/service-configured ]; then fi # Next stage, check if service-configured - if [ -f /home/umbrel/statuses/service-configured ]; then - echo "Service configured.. Checking for partitioned state" - if [ -f /home/umbrel/statuses/disk-partitioned ]; then - echo "If disk partitioned then start up Umbrel" - echo "Set up symlinks" - ln -s /etc/init.d/umbrelbox /etc/rc2.d/S01umbrelbox - ln -s /etc/init.d/umbrelbox /etc/rc3.d/S01umbrelbox - ln -s /etc/init.d/umbrelbox /etc/rc4.d/S01umbrelbox - ln -s /etc/init.d/umbrelbox /etc/rc5.d/S01umbrelbox - ln -s /etc/init.d/umbrelbox /etc/rc0.d/K01umbrelbox - ln -s /etc/init.d/umbrelbox /etc/rc1.d/K01umbrelbox - ln -s /etc/init.d/umbrelbox /etc/rc6.d/K01umbrelbox - # Do partitioning at first boot - echo "Enabling defaults for umbrelbox" - update-rc.d umbrelbox defaults || exit 1 - echo "Enabling startup for umbrel box" - update-rc.d umbrelbox enable || exit 1 - echo "starting up umbrelbox get it started now)" - /etc/init.d/umbrelbox start - else - echo "Disk not partitioned, will not start umbrel-compose framework (Please do it manually)" + echo "Service configured.. Checking for partitioned state" + if [ -f /home/umbrel/statuses/disk-partitioned ]; then + if [ ! -f /etc/rc2.d/S01umbrelbox ]; then + echo "Set up symlinks" + ln -s /etc/init.d/umbrelbox /etc/rc2.d/S01umbrelbox + ln -s /etc/init.d/umbrelbox /etc/rc3.d/S01umbrelbox + ln -s /etc/init.d/umbrelbox /etc/rc4.d/S01umbrelbox + ln -s /etc/init.d/umbrelbox /etc/rc5.d/S01umbrelbox + ln -s /etc/init.d/umbrelbox /etc/rc0.d/K01umbrelbox + ln -s /etc/init.d/umbrelbox /etc/rc1.d/K01umbrelbox + ln -s /etc/init.d/umbrelbox /etc/rc6.d/K01umbrelbox + # Do partitioning at first boot + echo "Enabling defaults for umbrelbox" + update-rc.d umbrelbox defaults || exit 1 + echo "Enabling startup for umbrel box" + update-rc.d umbrelbox enable || exit 1 + echo "starting up umbrelbox get it started now)" + /etc/init.d/umbrelbox start fi + else + echo "Disk not partitioned, will not start umbrel-compose framework (Please do it manually)" fi fi