Really fix openSUSE uptime command
This commit is contained in:
parent
74d4943115
commit
9a3a3bc83d
1 changed files with 6 additions and 1 deletions
7
fetch
7
fetch
|
@ -501,11 +501,16 @@ getuptime () {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux")
|
"Linux")
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "openSUSE"*)
|
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"*)
|
||||||
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
|
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
|
||||||
uptime=${uptime/ / }
|
uptime=${uptime/ / }
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"openSUSE"*)
|
||||||
|
uptime=$(uptime | awk -F ':[0-9]{2}+[a-z][a-z] |(, ){1}+' '{printf $2}')
|
||||||
|
uptime=${uptime/ / }
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
uptime="$(uptime -p)"
|
uptime="$(uptime -p)"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue