←  [EN] Third-Party Development

Forums

»

Detect dm version

jellyfish's Photo jellyfish 1 Mar 2011

anyway I can detect which DM I am on via shell script

The uname command doesnt provide me such information

would like to know if its a DM500, 800 600
Quote

nfnovice's Photo nfnovice 2 Mar 2011

my enigma1 cdk boxes are onloan or off-line at the moment .. so dm500 or dm7000 .. cant see

have a look at - "cat /proc/bus/dreambox | grep type" on an enigma1 oe box


have a look at "cat /proc/stb/info/model" on an enigma2 box
Quote

hemispherical1's Photo hemispherical1 2 Mar 2011

If you haven't edited the /etc/hostname files, the default names are model specific (also returned as part of uname -a).


cat /etc/hostname will return the box model by default.




--
hemi
Quote

jellyfish's Photo jellyfish 2 Mar 2011

If you haven't edited the /etc/hostname files, the default names are model specific (also returned as part of uname -a).


cat /etc/hostname will return the box model by default.




--
hemi



interesting this, just checked one my DM500 running OpenPli and said file has DM500 but another DM500 running NabilSat DarkStar II has Dreambox in said file.

thanks for the info
Quote

MiLo's Photo MiLo 2 Mar 2011

cat /proc/stb/info/model

(be aware that some models will lie to you, a VU+Duo will say that it's a 500hd for example)
Quote

hemispherical1's Photo hemispherical1 2 Mar 2011

interesting this, just checked one my DM500 running OpenPli and said file has DM500 but another DM500 running NabilSat DarkStar II has Dreambox in said file.

thanks for the info

As nfnovice kind of pointed out above, on an e1 box:

cat /proc/stb/info/model
cat: /proc/stb/info/model: No such file or directory

... you'd need a script to call both variations if dealing w/ e1 & e2 boxes.


You can edit the hostname file (to something unique if on the same lan), dm500-1, dm500-2, or livingroom, bedroom, etc... ;)

I didn't realize other images used different hostnames. I haven't played w/ nabliosat in years...

..

--
hemi
Quote

jellyfish's Photo jellyfish 2 Mar 2011

thanks for all help

here is the script I have written

#!/bin/sh
box="UNDEFINED"
etype=0

if [ -f "/proc/bus/dreambox" ]; then
echo "Enigma 1 Image Found"
box=`cat /proc/bus/dreambox | grep -i ^type`
etype=1
elif [ -f "/proc/stb/info/model" ]; then
echo "Enigma 2 Image Found"
box=`cat /proc/stb/info/model | grep -i ^type`
etype=2
else
echo "Not A Engima Image"
fi
echo $box
echo $etype

Quote

Amatøren's Photo Amatøren 2 Mar 2011

Hi.

I got a script and some more from a friend on this forum for making image from the Dreambox. I have deleted a lot, edit the rest and renamed (get_box.sh) it.
Put it on your dreambox eg. /etc, change the attributes to 755 and run it by telnet (/etc/get_box.sh). Then you get typed the box type and a OSD message with the box type.

I dont know how to make it to a plugin for use the plugin menu (yellow button) yet....

Free to use.

Attached Files

Quote

hemispherical1's Photo hemispherical1 2 Mar 2011

I dont know how to make it to a plugin for use the plugin menu (yellow button) yet....
.


Something like this, blow up the package and see what goes where... ;)


--
hemi

Attached Files

Quote

Amatøren's Photo Amatøren 2 Mar 2011

Thanks will try it later.
Quote

Amatøren's Photo Amatøren 3 Mar 2011

For not hijack the threat complet I have started a new for my script, so the original ide with this can continue:
http://www.pli-image...790#post_189790
Quote