Update linupx-scripts.sh
This commit is contained in:
@@ -69,6 +69,21 @@ UPDATE2() {
|
|||||||
if [ ${action-x} ]; then exit 0; fi
|
if [ ${action-x} ]; then exit 0; fi
|
||||||
read -n 1 -s -p "Press any key to continue"
|
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() {
|
DISTUPGRADE() {
|
||||||
if type yum &>/dev/null; then
|
if type yum &>/dev/null; then
|
||||||
$APTFUNC upgrade
|
$APTFUNC upgrade
|
||||||
@@ -249,22 +264,9 @@ SCRIPT_MENU() {
|
|||||||
|
|
||||||
if [ ${action-x} ]; then
|
if [ ${action-x} ]; then
|
||||||
case $1 in
|
case $1 in
|
||||||
1) DRYRUN1
|
update) UPDATE3;;
|
||||||
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;;
|
|
||||||
*) echo "Thats an invaild option,";
|
*) echo "Thats an invaild option,";
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
if [ -e ~/runup.sh ]; then
|
if [ -e ~/runup.sh ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user