@@ -30,7 +30,8 @@ help() {
3030 -d, --disable-remi Disable remi
3131 -e, --email Define email address
3232 -h, --help Print this help and exit
33- -f, --force Force installation"
33+ -f, --force Force installation
34+ -n, --noupdate Do not run yum update command"
3435 exit 1
3536}
3637
@@ -58,19 +59,21 @@ for arg; do
5859 --disable-remi) args=" ${args} -d " ;;
5960 --force) args=" ${args} -f " ;;
6061 --email) args=" ${args} -e " ;;
62+ --noupdate) args=" ${args} -n " ;;
6163 * ) [[ " ${arg: 0: 1} " == " -" ]] || delim=" \" "
6264 args=" ${args}${delim}${arg}${delim} " ;;
6365 esac
6466done
6567eval set -- " $args "
6668
6769# Getopt
68- while getopts " dhfe :" Option; do
70+ while getopts " dhfne :" Option; do
6971 case $Option in
7072 d) disable_remi=' yes' ;; # Disable remi repo
7173 h) help ;; # Help
7274 e) email=$OPTARG ;; # Set email
73- f) force=yes ;; # Force install
75+ f) force=' yes' ;; # Force install
76+ n) noupdate=' yes' ;; # Disable yum update
7477 * ) help ;; # Default
7578 esac
7679done
@@ -216,10 +219,12 @@ echo -e "\n\n\n\nInstallation will take about 15 minutes ...\n"
216219sleep 5
217220
218221# Update system
219- yum -y update
220- if [ $? -ne 0 ]; then
221- echo ' Error: yum update failed'
222- exit 1
222+ if [ -z " $noupdate " ]; then
223+ yum -y update
224+ if [ $? -ne 0 ]; then
225+ echo ' Error: yum update failed'
226+ exit 1
227+ fi
223228fi
224229
225230# Install EPEL repo
@@ -726,6 +731,7 @@ wget $CHOST/$VERSION/certificate.key -O certificate.key
726731if [ ! -z " $( grep ^admin: /etc/passwd) " ] && [ " $force " = ' yes' ]; then
727732 chattr -i /home/admin/conf > /dev/null 2>&1
728733 userdel -f admin
734+ chattr -i /home/admin/conf
729735 mv -f /home/admin $vst_backups /home/
730736 rm -f /tmp/sess_*
731737fi
0 commit comments