Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
@ -20,6 +20,6 @@
#
if which hostname >/dev/null 2>&1; then
if command -v hostname; then
hostname
fi
@ -24,12 +24,12 @@
# Use ip, if available
if which ip >/dev/null 2>&1; then
if command -v ip; then
ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p'
exit 0
if ! which ifconfig >/dev/null 2>&1; then
if ! command -v ifconfig; then
# no ifconfig, nothing we could do
@ -25,7 +25,7 @@ case "$($__explorer/os)" in
(. /etc/openwrt_release && echo "$DISTRIB_CODENAME")
;;
*)
lsb_release=$(which lsb_release 2>/dev/null)
lsb_release=$(command -v lsb_release)
if [ -x "$lsb_release" ]; then
$lsb_release --short --codename
(. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION")
$lsb_release --short --description
(. /etc/openwrt_release && echo "$DISTRIB_ID")
$lsb_release --short --id
(. /etc/openwrt_release && echo "$DISTRIB_RELEASE")
$lsb_release --short --release
@ -22,6 +22,6 @@
if which uname >/dev/null 2>&1; then
if command -v uname; then
uname -m
@ -20,7 +20,7 @@
set +e
executable=$(which runlevel 2>/dev/null)
executable=$(command -v runlevel)
if [ -x "$executable" ]; then
"$executable" | awk '{ print $2 }'