Added OpenBSD support to getbirthday

This commit is contained in:
Dylan 2016-01-31 10:38:20 +11:00
parent 19be922cb9
commit 09a3846738
1 changed files with 14 additions and 1 deletions

15
fetch
View File

@ -1202,7 +1202,20 @@ getbirthday () {
;;
*"BSD")
birthday="$(ls -alctT /etc/hostid | awk '{printf $6 " " $7 " " $9 " " $8}')"
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")"
;;