Added OpenBSD support to getbirthday

This commit is contained in:
Dylan 2016-01-31 10:38:20 +11:00
parent 19be922cb9
commit 09a3846738

13
fetch
View file

@ -1202,7 +1202,20 @@ getbirthday () {
;;
*"BSD")
case "$distro" in
"OpenBSD")
birthday="$(ls -alctT / | awk '/lost\+found/ {printf $6 " " $7 " " $9 " " $8}')"
;;
"FreeBSD")
birthday="$(ls -alctT /etc/hostid | awk '{printf $6 " " $7 " " $9 " " $8}')"
;;
*)
birthday="Unknown"
;;
esac
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
;;