New customer software repository and small fixes #30
@@ -137,7 +137,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Anyway run user scripts if existent
|
#Anyway run user scripts if existent
|
||||||
#elog_add_command "${CLIENT_SOFTWARE_DST}/user_run.sh $1"
|
|
||||||
elog_add "Running all software scripts in user- context."
|
elog_add "Running all software 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"
|
||||||
@@ -164,7 +163,14 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#2. Run the scripts, that are delivered by the package maintainers
|
#2. Run the scripts, that are delivered by the package maintainers
|
||||||
if [ -d "${CLIENT_SOFTWARE_CUST_DST}" ]; then
|
# 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
|
||||||
|
echo "Error in config: Required parameter CLIENT_SOFTWARE_CUST_DST is missing or set wrong."
|
||||||
|
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"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
elog_add "Company delivered scripts in ${CLIENT_SOFTWARE_CUST_DST}"
|
elog_add "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
|
||||||
|
|||||||
@@ -142,15 +142,6 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 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
|
|
||||||
echo "Error in config: Required parameter CLIENT_SOFTWARE_CUST_DST is missing or set wrong."
|
|
||||||
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"
|
|
||||||
echo ""
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running all software scripts in admin- context."
|
echo "Running all software 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 first."
|
||||||
@@ -179,11 +170,19 @@ done
|
|||||||
echo "Sucessfully installed pre-defined software."
|
echo "Sucessfully installed pre-defined software."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Then, sync all client_software-files
|
# To run scripts, the repository path must always be set right (but maybe empty, which is fine)
|
||||||
if [[ -z "${CLIENT_SOFTWARE_CUST_SRC}" ]]; then
|
if [ "${CLIENT_SOFTWARE_CUST_DST}" != "${SYSCONFIGPATH}/client_software_cust" ]; then
|
||||||
|
echo "Error in config: Required parameter CLIENT_SOFTWARE_CUST_DST is missing or set wrong."
|
||||||
|
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"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# Then, sync all client_software-files
|
||||||
|
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}"
|
||||||
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
|
||||||
mkdir -p ${CLIENT_SOFTWARE_CUST_DST}
|
mkdir -p ${CLIENT_SOFTWARE_CUST_DST}
|
||||||
@@ -203,20 +202,20 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Sucessfully synced."
|
echo "Sucessfully synced."
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
#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 software scripts in admin- 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
|
||||||
#search for string in dir
|
#search for string in dir
|
||||||
echo "Skipping ${DIR} while not in search parameter ( $1 )."
|
echo "Skipping ${DIR} while not in search parameter ( $1 )."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ -f "${DIR}/install.sh" ]; then
|
if [ -f "${DIR}/install.sh" ]; then
|
||||||
echo " ===================="
|
echo " ===================="
|
||||||
echo " >>> Running ${DIR}/install.sh"
|
echo " >>> Running ${DIR}/install.sh"
|
||||||
cd ${DIR}
|
cd ${DIR}
|
||||||
@@ -229,8 +228,9 @@ if [ ! -z "${CLIENT_SOFTWARE_CUST_DST}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo " ===================="
|
echo " ===================="
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Last, remove unused Flatpak- Runtimes and unused Data
|
#Last, remove unused Flatpak- Runtimes and unused Data
|
||||||
|
|||||||
Reference in New Issue
Block a user