Added the start of OpenBSD support
This commit is contained in:
parent
572062d98b
commit
b645fd71c5
14
fetch.sh
14
fetch.sh
|
@ -192,6 +192,10 @@ case "$(uname)" in
|
|||
"Darwin")
|
||||
os="Mac OS X"
|
||||
;;
|
||||
|
||||
"OpenBSD")
|
||||
os="OpenBSD"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get Title
|
||||
|
@ -212,6 +216,12 @@ getuptime () {
|
|||
uptime="Unknown"
|
||||
;;
|
||||
|
||||
"OpenBSD")
|
||||
uptime=$(uptime | awk -F, '{ print $1 }')
|
||||
uptime=${uptime# }
|
||||
uptime="${uptime# * up }"
|
||||
;;
|
||||
|
||||
*) uptime="$(uptime -p)" ;;
|
||||
esac
|
||||
}
|
||||
|
@ -252,6 +262,10 @@ getpackages () {
|
|||
packages=${packages//[[:blank:]]/}
|
||||
;;
|
||||
|
||||
"OpenBSD")
|
||||
packages=$(pkg_info | wc -l)
|
||||
;;
|
||||
|
||||
*) packages="Unknown" ;;
|
||||
esac
|
||||
}
|
||||
|
|
Reference in New Issue