Acest topic provine de pe forumul OpenATV !!!Comenzile Shell ale Linux sunt accesibile intr-o sesiune ... TelNet !
Comenzi Sistem# Restart Receiver:
reboot
# Restart GUI:
init 4 && init 3
# system info:
uname -a
# Query disk space:
df -h
#Memory:
cat /proc/meminfo
# running processes:
ps ax
# ...or "TOP" processes (can be terminated with "q")...
Top
# Network:
ifconfig
# Network Connections:
netstat -tulips
# Mounts:
mount
# list scheduled tasks:
crontab -l
# Uptime of the box:
up time
Comenzi "Packge Management"# update:
init 4
opkg update && opkg upgrade
reboot
# Query versions, e.g. secondstage:
opkg update && opkg list | grep seconds
# ...or search for the already installed ones via "list_installed"...
opkg list_installed *second*
# What is the update?
opkg update && opkg list-upgradable
# Install packages from /tmp...
opkg install /tmp/*.ipk
# ...or force overwrite...
opkg install --force-overwrite /tmp/*.ipk
# Install programs from the feed, e.g. curl and stat:
opkg update
opkg install curl stat
# Remove program:
opkg remove <PROGRAM>
# ...or uninstall incl. dependencies...
opkg remove --force-depends <PROGRAM>
# ...or automatically...
opkg remove --autoremove <PROGRAM>
Comenzi WebIF# Query image version:
wget -O - -q
http://127.0.0.1/web/deviceinfo | grep "\(<\|</\)e2imageversion" | tr -d '\n' | sed "s/.*<e2imageversion>\(.*\)<\/e2imageversion>.*/\\1\n/"
# Query PowerState:
wget -O - -q
http://127.0.0.1/web/powerstate | grep "\(<\|</\)e2instandby" | tr -d '\n' | sed "s/.*<e2instandby>\(.*\)<\/e2instandby.*/\\1\n/g"
# Set PowerState (newstate=) -> 0 = Toggle Standby; 1 = deep standby; 2 = reboot; 3 = restart Enigma2; 4 = wakeup form standby; 5 = Standby:
wget -O - -q
http://127.0.0.1/web/powerstate?newstate=0 | grep "\(<\|</\)e2instandby" | tr -d '\n' | sed "s/.*<e2instandby>\(.*\)<\/e2instandby.*/\\1\n/"
# query current channel:
wget -O - -q
http://127.0.0.1/web/getcurrent | grep "\(<\|</\)e2servicename" | tr -d '\n' | sed "s/.*<e2servicename>\(.*\)<\/e2servicename.*/\\1\n/"
# ...Incl. SID needed to switch...
wget -O - -q
http://127.0.0.1/web/getcurrent | grep -B 1 "\(<\|</\)e2servicename" | sed 's/<[^>]*>//g' | sed 's/^[ \t]*//' | sort -r
# Search channel, incl. SID, which is needed for switching, e.g. "the first hd"
wget -O - -q
http://127.0.0.1/web/getallservices | grep -i -B 1 "the first hd" | sed 's/<[^>]*>//g' | sed 's/^[ \t]*//' | sort -r
# Switch channel, e.g. to "the first hd"
wget -O - -q "http://127.0.0.1/web/zap?sRef=1:0:19:283D:3FB:1:C00000:0:0:0:"
# Send Message
# urlencoder:
http://url-encoder.de/# type -> 0 = "Yes|No" (useless); 1 = popup; 2 = MessageBox
# timeout -> how long the popup should be displayed (seconds; popup only)
# text -> message (urlencoded!)
# the following example sends "Greetings from Schorsch
"
wget -O - -q 'http://127.0.0.1/web/message?type=1&timeout=60&text=Gr%C3%BC%C3%9Fe%20von%20Schorsch%20%3A)'
Comenzi diverse# SEEK ------------------------------------------------ ----
# Search, e.g. for "automounts" in "/etc"
find /etc -name *automounts*
#CRON ------------------------------------------------ -----
# Set the receiver to standby every day at 5:00 a.m. (in case you forget to switch it off):
# Cron must of course be installed
crontab -e
# use the "i" key to enter edit mode and then paste the following (the first line is optional)...
# START (do not copy this line)
# min hour day month dow command
0 5 * * * /usr/bin/wget -q -O - 'http://127.0.0.1/web/powerstate?newstate=5' >/dev/null 2>&1
# END (do not copy this line)
# ...then click "ESC" and ":wq" to save and check if the entry exists...
crontab -l
# ...possibly. then a cron restart is necessary...
/etc/init.d/busybox-cron restart
# Run custom script on boot ---------------------
# in this example I also run my "ddns_client" at startup
# create the following script (copy everything between START and END) and follow the INSTALL instructions...
# IMPORTANT is that each command ends with "&"!
# START (do not copy this line)
#!/bin/sh
# ################################################# #########
# INSTALL:
# copy this file to: /usr/script/user_boot.sh
# chmod this file: chmod 0755 /usr/script/user_boot.sh
# create a symlink: ln -s /usr/script/user_boot.sh /etc/rc3.d/S99user_boot.sh
#
# UNINSTALL:
# rm /etc/rc3.d/S99user_boot.sh
# ################################################# #########
[ -x /usr/script/ddns_client.sh ] && /usr/script/ddns_client.sh &
exit 0
# END (do not copy this line)