fixed uptime detection and lxde config location on FreeBSD 9.1-RC2

This commit is contained in:
xquiet
2012-10-28 15:46:56 +00:00
parent e1ebc37765
commit c2e078a8db

View File

@@ -441,6 +441,8 @@ detectuptime () {
boot=`sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1`
now=`date +%s`
uptime=$(($now-$boot))
elif [ "$distro" == "FreeBSD" ]; then
uptime=`sysctl -n kern.boottime | awk -F' ' '{print $4}' | tr -d ","`
else
uptime=`awk -F. '{print $1}' /proc/uptime`
fi
@@ -864,6 +866,8 @@ detectgtk () {
lxdeconf="/lxde/config"
elif [ $distro == "Trisquel" ]; then
lxdeconf=""
elif [ "$distro" == "FreeBSD" ]; then
lxdeconf=""
else
lxdeconf="/lxsession/LXDE/desktop.conf"
fi
@@ -2079,4 +2083,4 @@ infoDisplay
[ "$screenshot" == "1" ] && takeShot
[ "$exportTheme" == "1" ] && themeExport
exit 0
exit 0