Black Hole
May contain traces of nut
According to one three of my boxes, tmenu has been updated. What?
Last edited:
That is great! And to help answer Black Hole's query what changes have you observed as a probably consequence of those updates to your boxes?Both my active HDR-Fox T2 boxes auto updated tmenu sometime last week IIRC. From 1.24 > 1.25
Menu version 1.25
Enter system PIN: ****
/-------------------------\
| T E L N E T M E N U |
\-------------------------/
[ Humax HDR-Fox T2 (HDRFOX1) 1.03.12/3.14 ]
maint - Restart into maintenance mode.
safe - Enable safe mode on next boot.
rma - Enable return-to-manufacturer (RMA) mode.
reset - Reset custom firmware environment.
upgrade - Upgrade all installed packages.
passwd - Remove web interface password.
fixweb - Re-install web interface.
reprog - Update the Custom Firmware
short - Run short hard-disk self test.
long - Run long hard-disk self test.
check - Check self-test progress.
stat - Show current activity.
x - Exit and close connection.
reboot - Reboot the Humax.
diag - Run a diagnostic.
cli - System command line (advanced users).
Please select option:
Menu version 1.24
Enter system PIN: ****
/-------------------------\
| T E L N E T M E N U |
\-------------------------/
[ Humax HDR-Fox T2 (HDR12) 1.03.12/3.13 ]
maint - Restart into maintenance mode.
safe - Enable safe mode on next boot.
rma - Enable return-to-manufacturer (RMA) mode.
reset - Reset custom firmware environment.
upgrade - Upgrade all installed packages.
passwd - Remove web interface password.
fixweb - Re-install web interface.
stat - Show current activity.
x - Exit and close connection.
reboot - Reboot the Humax.
diag - Run a diagnostic.
cli - System command line (advanced users).
Please select option:
reprog - Update the Custom Firmware
short - Run short hard-disk self test.
long - Run long hard-disk self test.
check - Check self-test progress.
I don't think that is necessary. This is running the hard drives self test rather than fix-disk.Shirley "short", "long", and "check" should be Maintenance Mode?
It depends what firmware version you have installed (3.13 or one of the 3.14 betas), but basically:C'mon @prpr, let us in on it!
--- tmenu-1.24
+++ tmenu-1.25
@@ -2,7 +2,7 @@
# $Id$
-vers=1.24
+vers=1.25
# Use the package-delivered script if it's newer.
pkgtmenu=/var/lib/humaxtv_backup/mod/tmenu
@@ -11,7 +11,7 @@
exit $?
fi
-trap '' SIGINT
+trap '' INT
# Set up predictable environment with no dependencies on /mod
PATH=/sbin:/bin export PATH
@@ -64,16 +64,19 @@
[ "$model" = HDR ] && display "$1" || display "\$$2"
}
-hdrdisk()
-{
- ddev=
+detect_disk()
+{
+ disk=
+ hdrdisk=
for dir in /sys/block/sd?; do
- ls -l $dir/device | grep -q /devices/pci || continue
- ddev=${dir#/sys/block/}
- break
+ grep -qv "File-Stor" "$dir/device/model" || continue
+ disk=${dir#/sys/block/}
+ if ls -l "$dir/device" | grep -q /devices/pci; then
+ hdrdisk=/dev/$disk
+ break
+ fi
done
- [ -z "$ddev" ] && echo "Could not detect internal disk device."
- echo /dev/$ddev
+ [ -n "$disk" ] && disk=/dev/$disk
}
umount_all()
@@ -209,7 +212,7 @@
echo " + unmounting."
umount $cdev || return
echo " + formatting disk."
- mkfs.ext2 -m 0 -O sparse_super -q $cdev || return
+ mkfs.ext2 -m 0 -O sparse_super $cdev || return
echo " + setting partition type."
sfdisk --part-type /dev/sda 1 83
echo " + re-mounting disk."
@@ -245,7 +248,7 @@
create_gpt()
{
- gdev=`hdrdisk`
+ gdev=$hdrdisk
notice "Unmounting partitions..."
@@ -253,7 +256,7 @@
notice "Clearing all existing partition tables..."
- sgdisk --zap-all $gdev 2>&1 > /dev/null
+ sgdisk --zap-all $gdev > /dev/null 2>&1
sgdisk --zap-all $gdev || return 1
notice "Creating GUID partition table (GPT)..."
@@ -342,8 +345,8 @@
mkdir -p "$fwpath"
cfutemp=$(/bin/mktemp -t cf.XXXXXX)
count=0
- > $cfutemp
- while [ 1 ]; do
+ : > $cfutemp
+ while :; do
echo
echo " /--$uline--\\"
echo " | $title |"
@@ -380,7 +383,7 @@
fi
if [ "$selection" = "d" ]; then
download_firmware
- > $cfutemp
+ : > $cfutemp
continue
fi
seltest=$(echo "$selection" | sed -e 's/[^0-9]\+//g')
@@ -405,9 +408,7 @@
fi
echo
if ays "$fwmsg"; then
- uopts=""
- [ $mmode -eq 0 ] && uopts="-f"
- session_start reprog /mod/bin/cfupdater -n "$fwloc" "$uopts"
+ session_start reprog /mod/bin/cfupdater -n "$fwloc"
exit 0
else
echo "Cancelled."
@@ -423,18 +424,23 @@
mmode_menu()
{
- if [ "$model" = HDR ]; then
- item fixdisk "Check and repair hard disk."
+ if [ -n "$disk" ]; then
item short "Run short hard-disk self test."
item long "Run long hard-disk self test."
item check "Check self-test progress."
- if gpt_convertible_disk; then
- item gptf "Re-format disk using GPT scheme."
- fi
- elif convertible_disk; then
- item convert "Convert USB flash drive to EXT2."
- else
- item "" "No suitable drive for EXT2 conversion detected."
+ if [ -n "$hdrdisk" ]; then
+ item fixdisk "Check and repair hard disk."
+ if gpt_convertible_disk; then
+ item gptf "Re-format disk using GPT scheme."
+ fi
+ fi
+ fi
+ if [ "$model" = HD ]; then
+ if convertible_disk; then
+ item convert "Convert USB flash drive to EXT2."
+ else
+ item "-" "No suitable drive for EXT2 conversion detected."
+ fi
fi
[ $modok -eq 1 ] && [ -x /mod/bin/cfupdater ] && item reprog "Update the Custom Firmware"
item epg "Clear persistent EPG data."
@@ -481,15 +487,15 @@
fi
;;
- HDR:short|HDR:long) # Disk self-test
+ *:short|*:long) # Disk self-test
ttype=$1
echo
- /bin/smartctl --test=$ttype `hdrdisk` | sed -n '7,9p'
- ;;
-
- HDR:check) # self-test check
- echo
- /bin/smartctl -l selftest `hdrdisk` | grep '^# 1 '
+ /bin/smartctl --test=$ttype $disk | sed -n '7,9p'
+ ;;
+
+ *:check) # self-test check
+ echo
+ /bin/smartctl -l selftest $disk | grep '^# 1 '
;;
HDR:gptf) # GPT conversion
@@ -566,11 +572,7 @@
fi ;;
HDR:dlna) # Clear DLNA data
if ays "reset DLNA server database?"; then
- if [ "$model" = HDR ]; then
- dlnadb=/mnt/hd2/dms_cds.db
- else
- dlnadb=/media/drive1/dms_cds.db
- fi
+ dlnadb=/mnt/hd2/dms_cds.db
echo "Resetting DLNA database."
[ -f $dlnadb ] && rm -f $dlnadb
echo "The DLNA database has been reset."
@@ -606,9 +608,7 @@
if [ $rmodver -ge 310 ]; then
item safe "$safemsg safe mode on next boot."
fi
- if [ "$model" = HDR ]; then
- item rma "$rmamsg return-to-manufacturer (RMA) mode."
- fi
+ item rma "$rmamsg return-to-manufacturer (RMA) mode."
item reset "Reset custom firmware environment."
if [ $modok -eq 1 ]; then
@@ -621,6 +621,11 @@
fi
item fixweb "Re-install web interface."
[ -x /mod/bin/cfupdater ] && /mod/bin/cfupdater -t && item reprog "Update the Custom Firmware"
+ fi
+ if [ -n "$disk" ]; then
+ item short "Run short hard-disk self test."
+ item long "Run long hard-disk self test."
+ item check "Check self-test progress."
fi
item stat "Show current activity."
item x "Exit and close connection."
@@ -658,7 +663,7 @@
The Humax will now reboot into maintenance mode.
After reboot please wait until the front panel display shows:
$mmpanel
-and then reconnect using telnet.
+and then reconnect.
EOM
do_reboot
@@ -680,7 +685,7 @@
"CFW services will not start on next boot."
fi ;;
- HDR:rma) # RMA mode
+ *:rma) # RMA mode
if [ -f $rmaflag ]; then
srm $rmaflag
echo "RMA mode reset,"\
@@ -697,8 +702,7 @@
Install a standard Humax firmware to complete the removal of all
traces of the custom firmware.
-If you change your mind, you can clear RMA mode via this same telnet
-menu.
+If you change your mind, you can clear RMA mode via this same menu.
EOM
if ays "enable RMA mode?"; then
@@ -799,6 +803,17 @@
firmware_update_menu
;;
+ *:short|*:long) # Disk self-test
+ ttype=$1
+ echo
+ /bin/smartctl --test=$ttype $disk | sed -n '7,9p'
+ ;;
+
+ *:check) # self-test check
+ echo
+ /bin/smartctl -l selftest $disk | grep '^# 1 '
+ ;;
+
*:x) # Exit
exit ;;
@@ -826,9 +841,9 @@
EOM
# reset, then re-ignore SIGINT around shell
- trap '-' SIGINT
+ trap '-' INT
/bin/sh -l
- trap '' SIGINT
+ trap '' INT
}
modenv()
@@ -864,6 +879,7 @@
fi
while :; do
+ detect_disk
if [ "$model" = "HD" ]; then
[ -d /mod/bin ] && modok=1 || modok=0
else
@@ -881,10 +897,13 @@
[ $banner ]
EOM
- if [ $modok -eq 0 ]; then
+ if [ -z "$disk" ]; then
+ echo " Note: Could not detect any disk devices."
+ echo
+ elif [ $modok -eq 0 ]; then
echo " Note: Some areas of the hard disk are not mounted."
echo " Not all functions will be available."
- echo " (normal if you have just run a disk check)"
+ echo " (This is normal if you have just run a disk check.)"
echo
fi