This page was exported from phaq [ http://phaq.phunsites.net ] Export date:Thu Apr 25 23:08:25 2024 / +0000 GMT ___________________________________________________ Title: Enable LCD backlight permanently on QNAP TS-459 II --------------------------------------------------- So you got one of these QNAP TS-459 II NAS boxes and want the fancy LCD being permantly backlit? Here's how to do it... I recommend to have the Optware (IPKG) package from the QPKG repository installed. While not strictly required, it will provide an framework to keep our changes persistent after reboots. Installing QPKG packages is made easy, just download the QPKG to your computer and install them from the QNAP admin panel. You'll find further readings on this topic on the QNAP homepage. If you have just a brand new setup of Optware, you must enable it to run startup scripts automatically as pointed out in QNAP Wiki in section Running /opt/etc/init.d/* on startup. If have you have already some services installed through Optware, like cron or snmpd, then the next step is not required. Otherwise, you may need to create a few directories and set proper permissions, as these may not yet exist. mkdir -p /opt/sbin /opt/etc/init.d chown admin:administrators /opt/sbin /opt/etc/init.d chmod 755 /opt/sbin /opt/etc/init.d So, after you successfully installed Optware (IPKG), let's move on with our backlight stuff. Save the code below to a new file at /opt/sbin/lcd_backlight. #!/bin/sh # # lcd_backlight - tries to keep front lcd lit at all times ;-) # while [ : ]; do # redirect lcd_tool output to nirvana # occasionally there'll be a 'cannot control LCD' message # but well, actually, who cares? ;-) /sbin/lcd_tool -o > /dev/null 2>&1 /bin/sleep 5 done Don't forget to make the new script executable: # chmod 755 /opt/sbin/lcd_backlight Now, you can always login through SSH and run /opt/sbin/lcd_backlight to have LCD backlight permanently turned on. Maybe you want this to start automatically every time you reboot the box? Add another script at /opt/etc/init.d/S99lcd-backlight with this contents: #!/bin/sh RETVAL=0 QPKG_NAME="LCD_Backlight" QPKG_DIR= _exit() { echo -e "Error: $*" echo exit 1 } case "$1" in start) echo "Enabling permanent LCD backlight ..." /opt/sbin/lcd_backlight & RETVAL=$? ;; stop) echo "Disabling permanent LCD backlight ... " /bin/ps aux|/bin/grep lcd_backlight|/bin/grep -v grep|/bin/grep -v stop|/bin/awk '{ print $1 }'|/usr/bin/xargs kill -9 RETVAL=$? /bin/sleep 3 ;; restart) $0 stop $0 start RETVAL=$? ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit $RETVAL Make this executable as well: chmod 755 /opt/etc/init.d/S99lcd-backlight This hack will permanently enable the LCD backlight. Even that the output is suppressed, it shall be noted that the 'lcd_tool' binary spills a 'Cannot control LCD' message every now and then. This seems to mean no harm. However, enabling the LCD backlight permanently is probably neither intended nor supported by the vendor. You do this at your own risk. --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2011-07-06 00:14:11 Post date GMT: 2011-07-05 23:14:11 Post modified date: 2012-01-22 18:38:46 Post modified date GMT: 2012-01-22 17:38:46 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com