Added OpenBSD support to getbirthday
This commit is contained in:
parent
19be922cb9
commit
09a3846738
1 changed files with 14 additions and 1 deletions
15
fetch
15
fetch
|
@ -1202,7 +1202,20 @@ getbirthday () {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"BSD")
|
*"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")"
|
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue