fix: omc self-upgrade
This commit is contained in:
@@ -4,6 +4,7 @@ filename="$1"
|
|||||||
neType="$2"
|
neType="$2"
|
||||||
duration=180
|
duration=180
|
||||||
expectBin=/usr/bin/expect
|
expectBin=/usr/bin/expect
|
||||||
|
omcBin=/usr/local/omc/bin
|
||||||
extension=$(basename "${1}" | awk -F . '{print $NF}')
|
extension=$(basename "${1}" | awk -F . '{print $NF}')
|
||||||
|
|
||||||
if [ ! -f ${expectBin} ]; then
|
if [ ! -f ${expectBin} ]; then
|
||||||
@@ -23,6 +24,9 @@ case "${extension}" in
|
|||||||
"y/n" { send "y\n"; exp_continue }
|
"y/n" { send "y\n"; exp_continue }
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
if [ ${neType} == "OMC" ]; then
|
||||||
|
${omcBin}/setomc.sh -m upgrade
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
rpm)
|
rpm)
|
||||||
if [ ${neType} == "OMC" ]; then
|
if [ ${neType} == "OMC" ]; then
|
||||||
@@ -35,6 +39,9 @@ EOF
|
|||||||
"y/n" { send "y\n"; exp_continue }
|
"y/n" { send "y\n"; exp_continue }
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
if [ ${neType} == "OMC" ]; then
|
||||||
|
${omcBin}/setomc.sh -m upgrade
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ filename="$1"
|
|||||||
neType="$2"
|
neType="$2"
|
||||||
duration=180
|
duration=180
|
||||||
expectBin=/usr/bin/expect
|
expectBin=/usr/bin/expect
|
||||||
|
omcBin=/usr/local/omc/bin
|
||||||
extension=$(basename "${1}" | awk -F . '{print $NF}')
|
extension=$(basename "${1}" | awk -F . '{print $NF}')
|
||||||
|
|
||||||
if [ ! -f ${expectBin} ]; then
|
if [ ! -f ${expectBin} ]; then
|
||||||
@@ -23,6 +24,9 @@ case "${extension}" in
|
|||||||
"y/n" { send "y\n"; exp_continue }
|
"y/n" { send "y\n"; exp_continue }
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
if [ ${neType} == "OMC" ]; then
|
||||||
|
${omcBin}/setomc.sh -m upgrade
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
rpm)
|
rpm)
|
||||||
if [ ${neType} == "OMC" ]; then
|
if [ ${neType} == "OMC" ]; then
|
||||||
@@ -35,6 +39,9 @@ EOF
|
|||||||
"y/n" { send "y\n"; exp_continue }
|
"y/n" { send "y\n"; exp_continue }
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
if [ ${neType} == "OMC" ]; then
|
||||||
|
${omcBin}/setomc.sh -m upgrade
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user