From fc87fcd551e6beb76f2a10eb21a14bfcd217ce43 Mon Sep 17 00:00:00 2001 From: "Christos.K" Date: Tue, 22 Aug 2017 19:44:56 +0300 Subject: Moved dev check to prelim instead of newsys --- config.d/controller/modules/functions/ct_prelim.sh | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/config.d/controller/modules/functions/ct_prelim.sh b/config.d/controller/modules/functions/ct_prelim.sh index 2a9cf6b..ebbd982 100644 --- a/config.d/controller/modules/functions/ct_prelim.sh +++ b/config.d/controller/modules/functions/ct_prelim.sh @@ -10,6 +10,27 @@ _call_backup_switch() { export _ctflag_switch } +_bsu_dfs() { + #/DEV/SDX + SYSDEV="$(blkid | grep "SYSFS" | awk -F ':' '{ print $1 }')" + BACKUPDEV="$(blkid | grep "BACKUPFS" | awk -F ':' '{ print $1 }')" + BOOTDEV="$(blkid | grep "BOOTFS" | awk -F ':' '{ print $1 }')" + USERDATADEV="$(blkid | grep "USERDATAFS" | awk -F ':' '{ print $1 }')" + + export SYSDEV + export BACKUPDEV + export USERDATADEV + export BOOTDEV + + # EXPORT SYSTEM'S FS + SYSFS="$(blkid | grep "LABEL=\"SYSFS\"" | awk -F ' ' '{print $4}' | awk -F '=' '{print $2}' | sed 's/\"//g')" + export SYS + + # EXPORT BACKUP's FS + BACKUPFS="$(blkid | grep "LABEL=\"BACKUPFS\"" | awk -F ' ' '{print $4}' | awk -F '=' '{print $2}' | sed 's/\"//g')" + export BACKUPFS +} + # CHECK IF LABELS EXIST _a_priori_devices() { if [[ -e "/dev/disk/by-label/SYSFS" ]]; then @@ -78,7 +99,7 @@ _shell() { sleep 2 echo 'echo -e "\e[33mInside Subshell\e[0m"' >> /root/.bashrc echo 'echo -e "\e[33mExit to return back to parent\e[0m"' >> /root/.bashrc - (clear; exec /bin/bash;) + (clear; exec /bin/bash && echo s;) sed -i "/Inside Subshell/d" "/root/.bashrc" sed -i "/Exit to return back to parent/d" "/root/.bashrc" echo -e "\e[33mYou are back to parent\e[0m" -- cgit v1.2.3-65-gdbad