Cosmetic changes
This commit is contained in:
@@ -82,11 +82,14 @@ git config --global --add safe.directory /opt/sys_config
|
|||||||
# Pre check for old configuration parameters, will be removed in the future
|
# Pre check for old configuration parameters, will be removed in the future
|
||||||
if [ ! -z "${CLIENT_SOFTWARE_DST}" ] || [ ! -z "${CLIENT_SOFTWARE_SRC}" ]; then
|
if [ ! -z "${CLIENT_SOFTWARE_DST}" ] || [ ! -z "${CLIENT_SOFTWARE_SRC}" ]; then
|
||||||
elog_add " ===================="
|
elog_add " ===================="
|
||||||
|
elog_add ""
|
||||||
elog_add "WARNING: Your company/setup has still CLIENT_SOFTWARE_DST or CLIENT_SOFTWARE_SRC set."
|
elog_add "WARNING: Your company/setup has still CLIENT_SOFTWARE_DST or CLIENT_SOFTWARE_SRC set."
|
||||||
elog_add "These parameters are obsolete and must be removed! The new parameters are CLIENT_SOFTWARE_CUST_DST and CLIENT_SOFTWARE_CUST_SRC"
|
elog_add "These parameters are obsolete and must be removed! The new parameters are CLIENT_SOFTWARE_CUST_DST and CLIENT_SOFTWARE_CUST_SRC"
|
||||||
elog_add "as the software repository has been split into customer software and distributed software."
|
elog_add "as the software repository has been split into customer software and distributed software."
|
||||||
elog_add "Please try to relog first. If this problem reoccures, contact your system admins to correct it."
|
elog_add "Please try to relog first. If this problem reoccures, contact your system admins to correct it."
|
||||||
elog_add "Will continue with the new path. Press any key to continue."
|
elog_add "Will continue with the new path. Press any key to continue."
|
||||||
|
elog_add ""
|
||||||
|
elog_add " ===================="
|
||||||
read -n 1 -s -r
|
read -n 1 -s -r
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -126,7 +129,7 @@ else
|
|||||||
# Rule seems to be ok, executing script
|
# Rule seems to be ok, executing script
|
||||||
elog_add "Matching Sudo rule found."
|
elog_add "Matching Sudo rule found."
|
||||||
elog_add ""
|
elog_add ""
|
||||||
elog_add "Running client software sync..."
|
elog_add "Running ${SYSCONFIGPATH}/system_setup/sync_client_software.sh"
|
||||||
elog_add_command "/usr/bin/sudo -n --preserve-env ${SYSCONFIGPATH}/system_setup/sync_client_software.sh install $1"
|
elog_add_command "/usr/bin/sudo -n --preserve-env ${SYSCONFIGPATH}/system_setup/sync_client_software.sh install $1"
|
||||||
if [[ $RETNO -ne 0 ]]; then
|
if [[ $RETNO -ne 0 ]]; then
|
||||||
elog_add "Errorcode was $RETNO"
|
elog_add "Errorcode was $RETNO"
|
||||||
@@ -137,9 +140,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Anyway run user scripts if existent
|
#Anyway run user scripts if existent
|
||||||
elog_add "Running all software scripts in user- context."
|
elog_add "Running scripts in user- context."
|
||||||
#1. Run the scripts, that are delivered by the package maintainers
|
#1. Run the scripts, that are delivered by the package maintainers
|
||||||
elog_add "Pre Installed scripts"
|
elog_add "Pre installed scripts"
|
||||||
for DIR in $(ls -d ${SYSCONFIGPATH}/client_software/*/ | sort); # list directories in the form "/tmp/dirname/"
|
for DIR in $(ls -d ${SYSCONFIGPATH}/client_software/*/ | sort); # list directories in the form "/tmp/dirname/"
|
||||||
do
|
do
|
||||||
DIR=${DIR%*/} # remove the trailing "/"
|
DIR=${DIR%*/} # remove the trailing "/"
|
||||||
@@ -162,6 +165,8 @@ do
|
|||||||
elog_add " ===================="
|
elog_add " ===================="
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
elog_add "Done running pre installed scripts"
|
||||||
|
|
||||||
#2. Run the scripts, that are delivered by the package maintainers
|
#2. Run the scripts, that are delivered by the package maintainers
|
||||||
# To run scripts, the tepository path must always be set right (but maybe empty, which is fine)
|
# To run scripts, the tepository path must always be set right (but maybe empty, which is fine)
|
||||||
if [ "${CLIENT_SOFTWARE_CUST_DST}" != "${SYSCONFIGPATH}/client_software_cust" ]; then
|
if [ "${CLIENT_SOFTWARE_CUST_DST}" != "${SYSCONFIGPATH}/client_software_cust" ]; then
|
||||||
@@ -169,7 +174,7 @@ if [ "${CLIENT_SOFTWARE_CUST_DST}" != "${SYSCONFIGPATH}/client_software_cust" ];
|
|||||||
echo "Please relog and if the problem reoccures, contact your system admins to correct the Values."
|
echo "Please relog and if the problem reoccures, contact your system admins to correct the Values."
|
||||||
read -n 1 -s -r -p "Press any key to continue"
|
read -n 1 -s -r -p "Press any key to continue"
|
||||||
else
|
else
|
||||||
elog_add "Company delivered scripts in ${CLIENT_SOFTWARE_CUST_DST}"
|
elog_add "Running company delivered scripts in ${CLIENT_SOFTWARE_CUST_DST}"
|
||||||
for DIR in $(ls -d ${CLIENT_SOFTWARE_CUST_DST}/*/ | sort); # list directories in the form "/tmp/dirname/"
|
for DIR in $(ls -d ${CLIENT_SOFTWARE_CUST_DST}/*/ | sort); # list directories in the form "/tmp/dirname/"
|
||||||
do
|
do
|
||||||
DIR=${DIR%*/} # remove the trailing "/"
|
DIR=${DIR%*/} # remove the trailing "/"
|
||||||
@@ -192,8 +197,9 @@ else
|
|||||||
elog_add " ===================="
|
elog_add " ===================="
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
elog_add "Completed user scripts in software."
|
elog_add "Done running company scripts"
|
||||||
fi
|
fi
|
||||||
|
elog_add "Completed user scripts."
|
||||||
elog_add ""
|
elog_add ""
|
||||||
|
|
||||||
# Remove unused flatpak user installed software and data
|
# Remove unused flatpak user installed software and data
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running all software scripts in admin- context."
|
echo "Running scripts in admin- context."
|
||||||
# Run pre installed scripts in client_software
|
# Run pre installed scripts in client_software
|
||||||
echo "Running pre installed scripts first."
|
echo "Running pre installed scripts in admin- context."
|
||||||
for DIR in $(ls -d ${SYSCONFIGPATH}/client_software/*/ | sort); do
|
for DIR in $(ls -d ${SYSCONFIGPATH}/client_software/*/ | sort); do
|
||||||
DIR=${DIR%*/} # remove the trailing "/"
|
DIR=${DIR%*/} # remove the trailing "/"
|
||||||
if [[ "$2." != "." ]] && [[ "${DIR}" != *"$2"* ]]; then
|
if [[ "$2." != "." ]] && [[ "${DIR}" != *"$2"* ]]; then
|
||||||
@@ -167,7 +167,7 @@ for DIR in $(ls -d ${SYSCONFIGPATH}/client_software/*/ | sort); do
|
|||||||
echo " ===================="
|
echo " ===================="
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Sucessfully installed pre-defined software."
|
echo "Done running pre installed scripts in admin- context."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# To run scripts, the repository path must always be set right (but maybe empty, which is fine)
|
# To run scripts, the repository path must always be set right (but maybe empty, which is fine)
|
||||||
@@ -182,6 +182,7 @@ else
|
|||||||
if [[ -z "${CLIENT_SOFTWARE_CUST_SRC}" ]]; then
|
if [[ -z "${CLIENT_SOFTWARE_CUST_SRC}" ]]; then
|
||||||
echo "No customer software sync is defined, skipping sync"
|
echo "No customer software sync is defined, skipping sync"
|
||||||
echo "${CLIENT_SOFTWARE_CUST_DST} with ${CLIENT_SOFTWARE_CUST_SRC}"
|
echo "${CLIENT_SOFTWARE_CUST_DST} with ${CLIENT_SOFTWARE_CUST_SRC}"
|
||||||
|
echo
|
||||||
else
|
else
|
||||||
echo "Syncing customer software repository ${CLIENT_SOFTWARE_CUST_DST}"
|
echo "Syncing customer software repository ${CLIENT_SOFTWARE_CUST_DST}"
|
||||||
# Create Directory if not existent
|
# Create Directory if not existent
|
||||||
@@ -207,7 +208,7 @@ else
|
|||||||
|
|
||||||
#Run customer setup
|
#Run customer setup
|
||||||
if [ ! -z "${CLIENT_SOFTWARE_CUST_DST}" ]; then
|
if [ ! -z "${CLIENT_SOFTWARE_CUST_DST}" ]; then
|
||||||
echo "Running all software scripts in admin- context."
|
echo "Running all company scripts in user- context."
|
||||||
for DIR in $(ls -d ${CLIENT_SOFTWARE_CUST_DST}/*/ | sort); do
|
for DIR in $(ls -d ${CLIENT_SOFTWARE_CUST_DST}/*/ | sort); do
|
||||||
DIR=${DIR%*/} # remove the trailing "/"
|
DIR=${DIR%*/} # remove the trailing "/"
|
||||||
if [[ "$1." != "." ]] && [[ "${DIR}" != *"$1"* ]]; then
|
if [[ "$1." != "." ]] && [[ "${DIR}" != *"$1"* ]]; then
|
||||||
@@ -230,6 +231,7 @@ else
|
|||||||
echo " ===================="
|
echo " ===================="
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
echo "Done running all company scripts in user- context."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user