Ich habe mir für OE2.5 einige scripte geschrieben die das Arbeiten im Terminal etwas vereinfachen (Im Grunde sind das alles nur front-ends) und habe mir überlegt ob ich dafür ein Paket machen soll.
Es gibt zwar auch hübsche aliases, aber die sind nicht in jedem Image gleich, deshalb auch die Überlegung, dass die tools in jedem Image installierbar sein sollen
Aber bevor ich mir die Arbeit mache und alles sauber scripte zwei Fragen:
Besteht überhaupt Interesse dafür? Das "Arbeiten" im Terminal der Box wird ja immer unbeliebter
Welche Funktionen, Infos oder Steuerungsmöglichkeiten im Terminal wären (noch) interessant?
Hier mal ein paar Beispiele:
das pwctl is u.a. deshalb entstanden, weil ich mir hin und wieder bei e2 restart über das Terminal Aufnahmen geschrottet habe, weil systemctl restart enigma2.service ohne Rückfrage brutal neu startet
aber das Grundkonzept schleppe ich nun schon seit OE1.6 mit ...
pwctl (power control script for Enigma2 - DreamOS OE2.5/OE2.6) german and english help available
Alles anzeigen
project name dbsds (dreambox storage device scanner)
Alles anzeigen
camdctrl (newnigma2 only!)
Alles anzeigen
Es gibt zwar auch hübsche aliases, aber die sind nicht in jedem Image gleich, deshalb auch die Überlegung, dass die tools in jedem Image installierbar sein sollen
Aber bevor ich mir die Arbeit mache und alles sauber scripte zwei Fragen:
Besteht überhaupt Interesse dafür? Das "Arbeiten" im Terminal der Box wird ja immer unbeliebter
Welche Funktionen, Infos oder Steuerungsmöglichkeiten im Terminal wären (noch) interessant?
Hier mal ein paar Beispiele:
das pwctl is u.a. deshalb entstanden, weil ich mir hin und wieder bei e2 restart über das Terminal Aufnahmen geschrottet habe, weil systemctl restart enigma2.service ohne Rückfrage brutal neu startet
aber das Grundkonzept schleppe ich nun schon seit OE1.6 mit ...
Quellcode
- root@dm900:~# pwctl -h
- pwctl: power control script for Enigma2: (OE2.2), DreamOS/OE2.5
- Usage: pwctl {-p|-t|-i|-w|-r|-s|-b|-c|-h|-V|-R|-S|-B|-J|-D|-L|-LL}
- -p, --powerstate show powerstate
- -t, --toggle toggle idle on/off
- -i, --idle idle mode (old: standby)
- -w, --wakeup wake up from idle mode
- -r, --e2restart restart enigma2
- checks timers and current recordings *)
- -s, --standby standby (old: deepstandby)
- turn off the device
- checks timers and current recordings *)
- -b, --reboot reboot device
- checks timers and current recordings *)
- -c, --check-recording check current recordings and pending
- timers within the next 7 minutes
- -V, --version information about this version
- -h, --help show this help
- *) if there are current recordings or
- pending timers within the next
- 7 minutes the action have to be confirmed
- to prevent defective recordings
- if Enigma2 or the Webinterface does not respond maybe some
- usefull commands:
- -R, --e2Restart (hard Reset) kills Enigma2 and restarts
- it again if possible (no check if there
- are current recordings or pending timers)
- -S, --Standby same as 'shutdown -h now' (no check if there
- are current recordings or pending timers)
- -B, --reBoot same as 'shutdown -r now' (no check if there
- are current recordings or pending timers)
- -J, --e2Journal same as 'journalctl -r -u enigma2'
- show the latest Enigma2 events (latest
- events on top) - terminate with [Q]
- -D, --Debug same as 'journalctl -f -u enigma2'
- enigma2 livelog for debugging
- terminate with [Ctrl]+[C]
- -L, --Logging the same as the options -D, --Debug
- enigma2 livelog to stdout and into logfile:
- /tmp/enigma2_YYYYMMDD_HHMMSS.log
- terminate with [Ctrl]+[C]
- -LL, --last-log show last logfile
- root@dm900:~#
- root@dm900:~# pwctl -c
- 0 recording(s) at the moment
- no pendig timer within the next 7 minutes
- root@dm900:~#
- root@dm900:~# pwctl -r
- 0 recording(s) at the moment
- a pending timer will start in 0 minute(s) and 51 second(s)
- on So, 8. Mär. 2020 at 10:38:00
- restart enigma2 anyway? (y/n)
- no
- restart enigma2 cancelled
- root@dm900:~#
- root@dm900:~# pwctl --toggle
- toggle powerstate dm900
- dm900 is in idle mode now
- root@dm900:~# pwctl -t
- toggle powerstate dm900
- dm900 is active now
- root@dm900:~#
Quellcode
- root@dm900:~# dbsds -h
- dbsds - dreambox storage device scanner
- -d, --show-all show all devices
- -a, --show-ata show all ATA devices
- -u, --show-usb show all USB devices
- -s, --show-mmc show all MMC/SD devices
- -p, --show-partitions show all partitions
- -m, --show-mounts show all mounted partions
- -i, --device-info show device infos
- -V, --version version info
- -L, --lisence lisence info
- -h, --help show this help
- root@dm900:~#
- root@dm900:~# dbsds -d
- /dev/mmcblk1: SD/MMC
- Model: SD SC16G
- Disk: 15,9GB
- /dev/sda: SATA
- Model: ATA ST2000LM015-2E81
- Disk: 2000GB
- root@dm900:~#
- root@dm900:~# dbsds -p
- /dev/mmcblk1: SD/MMC
- Model: SD SC16G
- Disk: 15,9GB
- Partition Table: msdos
- Number Start End Size Type File system Flags
- 1 1049kB 15,9GB 15,9GB primary ext4
- /dev/sda: SATA
- Model: ATA ST2000LM015-2E81
- Disk: 2000GB
- Partition Table: gpt
- Number Start End Size File system Name Flags
- 1 1049kB 1999GB 1999GB ext4 dreambox-storage
- 2 1999GB 2000GB 1073MB linux-swap(v1) dreambox-swap
- root@dm900:~#
- root@dm900:~# dbsds -i
- /dev/mmcblk1: SD/MMC
- Model: SD SC16G
- Disk: 15,9GB
- /dev/mmcblk1p1: LABEL="sd-card" UUID="e6e1f2b7-0e33-41e9-9be0-75e88ffa5623" TYPE="ext4"
- /dev/mmcblk1: PTTYPE="dos"
- /dev/sda: SATA
- Model: ATA ST2000LM015-2E81
- Disk: 2000GB
- /dev/sda1: LABEL="dreambox-storage" UUID="de954d30-ec21-4cc7-a60b-f9590177e7d8" TYPE="ext4" PARTLABEL="dreambox-storage" PARTUUID="894710b7-115b-48d3-9d2e-2139d7ead6dd"
- /dev/sda2: UUID="483a8166-7065-4a34-92d0-0c912a9b4fd2" TYPE="swap" PARTLABEL="dreambox-swap" PARTUUID="f6fc5ae3-02df-41d2-b10b-c97e624da7f3"
- root@dm900:~#
- root@dm900:~# dbsds -m
- /dev/mmcblk1: SD/MMC
- Model: SD SC16G
- Disk: 15,9GB
- /dev/mmcblk1p1 mounted to
- /media/sd
- /usr/local
- /picons
- /usr/share/enigma2/MetrixStyleHD-FBT
- /usr/script
- /usr/keys
- /dev/sda: SATA
- Model: ATA ST2000LM015-2E81
- Disk: 2000GB
- /dev/sda1 mounted to /media/hdd
- /dev/sda2 mounted to
- root@dm900:~#
Quellcode
- root@dm900:~# camdctrl
- USAGE: {start|stop|restart|current|currentscript|status|help}
- root@dm900:~#
- root@dm900:~# camdctrl status
- current emu: OScam modern #1540 -> running
- current emu start/stop script: /usr/script/OScam_1540_modern.emu
- current emu binary: /usr/local/bin/OScam_1540
- root@dm900:~#
- root@dm900:~# camdctrl currentscript
- /usr/script/OScam_1540_modern.emu
- root@dm900:~# camdctrl restart
- [SCRIPT] stop: OScam modern #1540
- [SCRIPT] start: OScam modern #1540
- root@dm900:~#
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von Fred Bogus Trumper ()