Browse Source

Properly detect OpenWRT in global explorers

Signed-off-by: Giel van Schijndel <giel+cdist@mortis.eu>
feature_files_export
Giel van Schijndel 11 years ago
parent
commit
9538ef6462
  1. 15
      conf/explorer/lsb_codename
  2. 15
      conf/explorer/lsb_description
  3. 15
      conf/explorer/lsb_id
  4. 15
      conf/explorer/lsb_release
  5. 5
      conf/explorer/os
  6. 3
      conf/explorer/os_version

15
conf/explorer/lsb_codename

@ -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

15
conf/explorer/lsb_description

@ -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

15
conf/explorer/lsb_id

@ -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

15
conf/explorer/lsb_release

@ -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

5
conf/explorer/os

@ -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

3
conf/explorer/os_version

@ -45,6 +45,9 @@ case "$($__explorer/os)" in
*bsd|solaris)
uname -r
;;
openwrt)
cat /etc/openwrt_version
;;
owl)
cat /etc/owl-release
;;

Loading…
Cancel
Save