Added OpenBSD support to getbirthday
This commit is contained in:
parent
19be922cb9
commit
09a3846738
15
fetch
15
fetch
|
@ -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")"
|
||||
;;
|
||||
|
||||
|
|
Reference in New Issue