Update linupx-scripts.sh

This commit is contained in:
2018-08-23 08:51:44 -05:00
parent 384956b7d5
commit 93ea424cda

View File

@@ -69,6 +69,21 @@ UPDATE2() {
if [ ${action-x} ]; then exit 0; fi
read -n 1 -s -p "Press any key to continue"
}
UPDATE3() {
if type yum &>/dev/null; then
$APTFUNC -y update
else
if [ "$useAutoremove" -ne 0 ]; then
$APTFUNC -y autoremove
$APTFUNC update
$APTFUNC upgrade -y
$APTFUNC -y autoremove
fi
fi
echo ""
echo -e "${Green}Updates have completed${Color_Off}"
exit 0
}
DISTUPGRADE() {
if type yum &>/dev/null; then
$APTFUNC upgrade
@@ -249,22 +264,9 @@ SCRIPT_MENU() {
if [ ${action-x} ]; then
case $1 in
1) DRYRUN1
SCRIPT_MENU;;
2) UPDATE1
SCRIPT_MENU;;
3) UPDATE2
SCRIPT_MENU;;
4) DRYRUN2
SCRIPT_MENU;;
5) DISTUPGRADE
SCRIPT_MENU;;
[Rr]) GO_REBOOT
SCRIPT_MENU;;
[Ss]) SHUTDOWN
SCRIPT_MENU;;
update) UPDATE3;;
*) echo "Thats an invaild option,";
exit 1;;
exit 1;;
esac
else
if [ -e ~/runup.sh ]; then