diff options
author | 2017-06-15 22:06:30 +0300 | |
---|---|---|
committer | 2017-06-15 22:06:30 +0300 | |
commit | 9df6c64bb5d07c1ae4153264fed8d60cac68ee68 (patch) | |
tree | 859766bb1726d6f28520d113c48623049b4bdd63 /scripts | |
parent | Updated package use entries for the apply new basic profile part (diff) | |
download | GSE-9df6c64bb5d07c1ae4153264fed8d60cac68ee68.tar.gz GSE-9df6c64bb5d07c1ae4153264fed8d60cac68ee68.tar.bz2 GSE-9df6c64bb5d07c1ae4153264fed8d60cac68ee68.zip |
Fixed start new force entry
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/chroot_scripts/cfunctions | 4 | ||||
-rwxr-xr-x | scripts/chroot_scripts/chroot_init | 7 | ||||
-rwxr-xr-x | scripts/functions/sinit_functions | 9 | ||||
-rwxr-xr-x | scripts/sinit | 16 |
4 files changed, 20 insertions, 16 deletions
diff --git a/scripts/chroot_scripts/cfunctions b/scripts/chroot_scripts/cfunctions index 7189e5e..faee943 100755 --- a/scripts/chroot_scripts/cfunctions +++ b/scripts/chroot_scripts/cfunctions @@ -278,7 +278,7 @@ build_the_world() { [yY][eE][sS]|[yY]) if emerge -eq @world; then _e_report_back "World rebuild has been completed" - chsinit_mon "REBUILD"; break + _monitor_chroot_flow "REBUILD"; break else echo "emerge -eq @world" > LAST_FAILED_COMMAND combat_medic @@ -286,7 +286,7 @@ build_the_world() { [nN][oO]|[nN]) echo "Exiting Rebuilding Part" sleep 1 - chsinit_mon "REBUILD"; break;; + _monitor_chroot_flow "REBUILD"; break;; esac done unset YN diff --git a/scripts/chroot_scripts/chroot_init b/scripts/chroot_scripts/chroot_init index 194e7e9..f957003 100755 --- a/scripts/chroot_scripts/chroot_init +++ b/scripts/chroot_scripts/chroot_init @@ -65,7 +65,7 @@ _sreb() { env-update > /dev/null 2>&1 && source /etc/profile && export PS1="( 'Part D: Rebuilding system' ) $PS1" export PATH=${PATH}:${CHDIR} build_the_world - chsinit_mon_f "REBUILD" + _monitor_chroot_flow "REBUILD" } if [[ "$(awk -F '=' '/REBUILD/{ print $2 }' <"${CHDIR}/chsinprog")" == 0 || -n $(echo "${_flag_force_new}") ]]; then @@ -203,11 +203,6 @@ _emerge_depclear eclean-dist -d eclean-pkg -d - -#rm -rf /usr/src/linux-4.9.16-gentoo -#rm -rf /usr/src/linux -#rm -rf issues.info - # Creating user-data dir-tree mkdir -p /user-data/persistent/{etc,var,logs,config.d,local,rmount} mkdir -p /user-data/persistent/local/{data,home,root,mnt,media} diff --git a/scripts/functions/sinit_functions b/scripts/functions/sinit_functions index 453777d..3c76270 100755 --- a/scripts/functions/sinit_functions +++ b/scripts/functions/sinit_functions @@ -106,8 +106,12 @@ _keep(){ _e_report_back "The keep flag has been detected." _e_report_back "Making backup of, $1 before proceeding with purging" - tar czvf "/var/tmp/gse/${_date_var}/$1.tar.bz2" "$2" >/dev/null 2>&1 \ - && return 0 || return 1 + if [[ -d "$2" ]]; then + tar czvf "/var/tmp/gse/${_date_var}/$1.tar.bz2" "$2" >/dev/null 2>&1 \ + && return 0 || return 1 + elif [[ ! -d "$2" ]]; then + cp "$2" "/var/tmp/gse/${_date_var}/$1" + fi } _e_report_back() { @@ -221,7 +225,6 @@ _clean_target() { burn "$1/issues.info" burn "$1/root/.bash*" burn "$1/usr/src/linux*" - burn "$1/usr/src/linux" burn "$1/sinit.d" # MINIMAL SYSTEM REQUEST if [[ -n "${_flag_minimal}" ]]; then diff --git a/scripts/sinit b/scripts/sinit index b849f73..13e4524 100755 --- a/scripts/sinit +++ b/scripts/sinit @@ -23,12 +23,18 @@ source "${CWORKDIR}/etc/gentoo.conf" >/dev/null 2>&1 \ # PART A FUNDAMENTALS _part_a() { # CHECK IF THERE IS ANY WORK DONE - if [[ "$(awk -F '=' '/CHECK/{ print $2 }' < "${CLOCALLG}/sinprog")" == 1 ]] || echo "$@" | grep -q 'force'; then + if [[ "$(awk -F '=' '/CHECK/{ print $2 }' < "${CLOCALLG}/sinprog")" == 1 ]]; then + if echo "${_flag_base}" | grep -q 'catalyst'; then + _start_again "${CDISTDIR}/workdir-catalyst" "$@" + elif echo "${_flag_base}" | grep -q 'precomp'; then + _start_again "${CDISTDIR}/workdir-precomp" "$@" + fi + elif echo "$@" | grep -q 'force'; then if echo "${_flag_base}" | grep -q 'catalyst'; then _start_again "${CDISTDIR}/workdir-catalyst" "$@" "force" elif echo "${_flag_base}" | grep -q 'precomp'; then _start_again "${CDISTDIR}/workdir-precomp" "$@" "force" - fi + fi fi # CALL CATALYST BUILD OR PRECOMPILED BUILD @@ -159,17 +165,17 @@ _am_i_root "$UID" && echo -e "[\e[32m*\e[0m] Requesting root privileges" \ TARGETSTAMP="$(grep 'version_stamp' "${CCONFDIR}/system/catalyst/stage3.spec" \ | sed '/^#/ d' | awk -F ' ' '{ print $2 }' | sed -e "s_\"__g")" -if echo "${_enforce_args[@]}" | grep 'gpartb'; then +if [[ -n "${_flag_start_new}" ]] || echo "${_enforce_args[@]}" | grep 'gpartb'; then if _prepare_chroot "${BWORKDIR}" "$@" 'cforce'; then _clean_target "${BWORKDIR}" "$@" || die else - die + die "Cleaning failed" fi else if _prepare_chroot "${BWORKDIR}" "$@"; then _clean_target "${BWORKDIR}" "$@" || die else - die + die "Cleaning failed" fi fi |