}
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
+ (date -r \
+ $( \
+ ls -1drt \
+ /lost+found \
+ /etc/ssh/ssh_host_*_key.pub\
+ /etc/ssh_host_dsa_key.pub \
+ |head -1 \
+ ) +'%F %T' \
+ ) 2>/dev/null
}
sys_nproc() {
rm -rf "$tmp"*
}
-sys_os() {
+sys_os() {
+
if [ -e /etc/os-release ]; then
- (
- . /etc/os-release && echo $ID $VERSION
- )
+ #( . /etc/os-release && echo $ID $VERSION )
+ sh -c '. /etc/os-release && echo $ID $VERSION'
elif which lsb_release > /dev/null; then
- lsb_release --short -d
+ lsb_release --short -d
elif which sw_vers > /dev/null; then
- echo $(sw_vers 2>/dev/null | awk -F':\t' '/^(ProductName|ProductVersion)/{print $2}' | head -2) && return
+ echo $(sw_vers 2>/dev/null | \
+ awk -F':\t' '/^(ProductName|ProductVersion)/{print $2}' | head -2)
fi
- #[ -r /etc/debian_version ] && echo Debian $(cat /etc/debian_version) && return
+ #[ -r /etc/debian_version ] && echo Debian $(cat /etc/debian_version)
}
sys_mem_total() {