• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[tmenu]

What you see when you connect by telnet. IIRC there's one in the flash and one out where it can be updated, which overrides the firmware version if accessible.
 
Both my active HDR-Fox T2 boxes auto updated tmenu sometime last week IIRC. From 1.24 > 1.25
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?
 
With 1.25:

Code:
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:

I tried uninstalling the tmenu package so I could compare what it did before, but it won't go!

C'mon @prpr, let us in on it!
 
Code:
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:
 
Last edited:
Oh! These are new:

Code:
  reprog - Update the Custom Firmware                                                     
   short - Run short hard-disk self test.                                                 
    long - Run long hard-disk self test.                                                 
   check - Check self-test progress.

"reprog" must be a link to cfupdater.

Shirley "short", "long", and "check" should be Maintenance Mode?
 
C'mon @prpr, let us in on it!
It depends what firmware version you have installed (3.13 or one of the 3.14 betas), but basically:
  • Add SMART tests/check in normal mode
  • Detect external disks to allow SMART (on the HD)
  • Allow RMA option on the HD
  • Remove confusing textual references to telnet
and other minor tidy-ups as discussed in the forum over time.

The most useful for anyone with a sizeable disk is being able to run a long SMART test while the machine is in normal use (because it takes ***ing ages) and then being able to boot to maintenance mode to run fixdisk with the appropriate parameters to allow it to skip the short test and use the results from the just completed long test (typically "-s -r -y" for least human input).
You do of course have to have installed the updated fixdisk package or be running a recent beta firmware (I forget which) for this to work.
Fixdisk itself takes ***ing ages, but at least it's about half the out-of-service time it might otherwise have been.

I'm not sure why tmenu is a dependency of webif other than to force installation of the latest version.
 
In case anyone cares (as installed on HD Fox)::
Code:
--- 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
 
Back
Top