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
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --codename
|
||||
fi
|
||||
case "$($__explorer/os)" in
|
||||
openwrt)
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_CODENAME")
|
||||
;;
|
||||
*)
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --codename
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -20,7 +20,14 @@
|
|||
#
|
||||
|
||||
set +e
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --description
|
||||
fi
|
||||
case "$($__explorer/os)" in
|
||||
openwrt)
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION")
|
||||
;;
|
||||
*)
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --description
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -20,7 +20,14 @@
|
|||
#
|
||||
|
||||
set +e
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --id
|
||||
fi
|
||||
case "$($__explorer/os)" in
|
||||
openwrt)
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_ID")
|
||||
;;
|
||||
*)
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --id
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -20,7 +20,14 @@
|
|||
#
|
||||
|
||||
set +e
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --release
|
||||
fi
|
||||
case "$($__explorer/os)" in
|
||||
openwrt)
|
||||
(. /etc/openwrt_release && echo "$DISTRIB_RELEASE")
|
||||
;;
|
||||
*)
|
||||
lsb_release=$(which lsb_release 2>/dev/null)
|
||||
if [ -x "$lsb_release" ]; then
|
||||
$lsb_release --short --release
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -56,6 +56,11 @@ if [ -f /etc/gentoo-release ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/openwrt_version ]; then
|
||||
echo openwrt
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /etc/owl-release ]; then
|
||||
echo owl
|
||||
exit 0
|
||||
|
|
|
@ -45,6 +45,9 @@ case "$($__explorer/os)" in
|
|||
*bsd|solaris)
|
||||
uname -r
|
||||
;;
|
||||
openwrt)
|
||||
cat /etc/openwrt_version
|
||||
;;
|
||||
owl)
|
||||
cat /etc/owl-release
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue