From: Nicolas Boisselier Date: Sun, 17 Feb 2019 21:02:26 +0000 (+0000) Subject: etc/profile.d/sys.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=a8062472a520b37efae23332d99ab0ffd0e27db8;p=nb.git etc/profile.d/sys.sh --- diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index 9e075ecc..0de557b1 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -12,10 +12,14 @@ date_install${s}$(sys_date_install) ips${s}$(echo -n $(ips 2>/dev/null)) public_ip${s}$( (http_get http://nicolas.boisselier.free.fr/myip/) 2>/dev/null) model${s}$([ -r /proc/device-tree/model ] && printf '%s\t%s\n' model "$(cat /proc/device-tree/model)") -debian version${s}$([ -r /etc/debian_version ] && cat /etc/debian_version) +os${s}$(sys_os) EOF } +sys_os() { + [ -r /etc/debian_version ] && echo Debian $(cat /etc/debian_version) && return +} + sys_date_install() { (date -r $(ls -1drt /lost+found /etc/ssh/ssh_host_dsa_key.pub /etc/ssh_host_dsa_key.pub|head -1) +'%F %T') 2>/dev/null }