Skip to content
Snippets Groups Projects
Commit 36aacfe4 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

fix check_tree function

parent f4a57653
Branches
Tags
No related merge requests found
......@@ -48,7 +48,7 @@ check_tree(){
local tree="${1}"
if ! 66-intree "${tree}" 1>/dev/null 2>&1; then
if ! [[ -d /var/lib/66/system/"${tree}" ]]; then
return 1 ;
else
oblog "Tree ${tree} already exist"
......@@ -131,8 +131,8 @@ config_tree_base_user(){
oblog "Create base tree for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "if ! 66-intree base 1>/dev/null 2>&1; then \
66-tree -zv3 -Ecn base \
su "${NEWUSER}" -c "if ! [[ s6-test /home/${NEWUSER}/.66/system/base ]]; then \
66-tree -zv3 -Ecn base ; \
fi" || die "unable to create base tree"
}
......
......@@ -48,7 +48,7 @@ check_tree(){
local tree="${1}"
if ! 66-intree "${tree}" 1>/dev/null 2>&1; then
if ! [[ -d /var/lib/66/system/"${tree}" ]]; then
return 1 ;
else
oblog "Tree ${tree} already exist"
......
......@@ -48,7 +48,7 @@ check_tree(){
local tree="${1}"
if ! 66-intree "${tree}" 1>/dev/null 2>&1; then
if ! [[ -d /var/lib/66/system/"${tree}" ]]; then
return 1 ;
else
oblog "Tree ${tree} already exist"
......@@ -143,8 +143,8 @@ config_tree_base_user(){
oblog "Create base tree for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "if ! 66-intree base 1>/dev/null 2>&1; then \
66-tree -zv3 -Ecn base \
su "${NEWUSER}" -c "if ! [[ s6-test /home/${NEWUSER}/.66/system/base ]]; then \
66-tree -zv3 -Ecn base ; \
fi" || die "unable to create base tree"
}
......
......@@ -53,7 +53,7 @@ check_tree(){
local tree="${1}"
if ! 66-intree "${tree}" 1>/dev/null 2>&1; then
if ! [[ -d /var/lib/66/system/"${tree}" ]]; then
return 1 ;
else
oblog "Tree ${tree} already exist"
......@@ -203,15 +203,15 @@ config_enable_system(){
config_tree_base_user(){
if ! check_tree "${NEWUSER}"; then
oblog "For ${NEWUSER}: Create and enable [${NEWUSER}] tree. Set it as the current user tree"
oblog "For ${NEWUSER}: Create and enable [${NEWUSER}] tree. Set it as the current user tree"
out_progress "Starting ..."
out_progress "Starting ..."
su "${NEWUSER}" -c "66-tree -zv3 -nEc ${NEWUSER}"
su "${NEWUSER}" -c "if ! [[ s6-test /home/${NEWUSER}/.66/system/${NEWUSER} ]]; then \
66-tree -zv3 -Ecn ${NEWUSER} ; \
fi" || die "unable to create base tree"
out_progress "Done"
fi
out_progress "Done"
}
config_enable_base_user(){
......
......@@ -48,7 +48,7 @@ check_tree(){
local tree="${1}"
if ! 66-intree "${tree}" 1>/dev/null 2>&1; then
if ! [[ -d /var/lib/66/system/"${tree}" ]]; then
return 1 ;
else
oblog "Tree ${tree} already exist"
......@@ -142,8 +142,8 @@ config_tree_base_user(){
oblog "Create base tree for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "if ! 66-intree base 1>/dev/null 2>&1; then \
66-tree -zv3 -Ecn base \
su "${NEWUSER}" -c "if ! [[ s6-test /home/${NEWUSER}/.66/system/base ]]; then \
66-tree -zv3 -Ecn base ; \
fi" || die "unable to create base tree"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment