Properly detect OpenWRT in global explorers
Signed-off-by: Giel van Schijndel <giel+cdist@mortis.eu>
This commit is contained in:
parent
5e20ba5a13
commit
9538ef6462
6 changed files with 52 additions and 16 deletions
|
@ -20,7 +20,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
case "$($__explorer/os)" in
|
||||||
|
openwrt)
|
||||||
|
(. /etc/openwrt_release && echo "$DISTRIB_CODENAME")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
lsb_release=$(which lsb_release 2>/dev/null)
|
lsb_release=$(which lsb_release 2>/dev/null)
|
||||||
if [ -x "$lsb_release" ]; then
|
if [ -x "$lsb_release" ]; then
|
||||||
$lsb_release --short --codename
|
$lsb_release --short --codename
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
|
@ -20,7 +20,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
case "$($__explorer/os)" in
|
||||||
|
openwrt)
|
||||||
|
(. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
lsb_release=$(which lsb_release 2>/dev/null)
|
lsb_release=$(which lsb_release 2>/dev/null)
|
||||||
if [ -x "$lsb_release" ]; then
|
if [ -x "$lsb_release" ]; then
|
||||||
$lsb_release --short --description
|
$lsb_release --short --description
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
|
@ -20,7 +20,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
case "$($__explorer/os)" in
|
||||||
|
openwrt)
|
||||||
|
(. /etc/openwrt_release && echo "$DISTRIB_ID")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
lsb_release=$(which lsb_release 2>/dev/null)
|
lsb_release=$(which lsb_release 2>/dev/null)
|
||||||
if [ -x "$lsb_release" ]; then
|
if [ -x "$lsb_release" ]; then
|
||||||
$lsb_release --short --id
|
$lsb_release --short --id
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
|
@ -20,7 +20,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
case "$($__explorer/os)" in
|
||||||
|
openwrt)
|
||||||
|
(. /etc/openwrt_release && echo "$DISTRIB_RELEASE")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
lsb_release=$(which lsb_release 2>/dev/null)
|
lsb_release=$(which lsb_release 2>/dev/null)
|
||||||
if [ -x "$lsb_release" ]; then
|
if [ -x "$lsb_release" ]; then
|
||||||
$lsb_release --short --release
|
$lsb_release --short --release
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
|
@ -56,6 +56,11 @@ if [ -f /etc/gentoo-release ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/openwrt_version ]; then
|
||||||
|
echo openwrt
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f /etc/owl-release ]; then
|
if [ -f /etc/owl-release ]; then
|
||||||
echo owl
|
echo owl
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -45,6 +45,9 @@ case "$($__explorer/os)" in
|
||||||
*bsd|solaris)
|
*bsd|solaris)
|
||||||
uname -r
|
uname -r
|
||||||
;;
|
;;
|
||||||
|
openwrt)
|
||||||
|
cat /etc/openwrt_version
|
||||||
|
;;
|
||||||
owl)
|
owl)
|
||||||
cat /etc/owl-release
|
cat /etc/owl-release
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue