04-29-2011 07:45 PM - edited 04-29-2011 08:13 PM
After mount -o bind, do you need to put a hashed password into the file for root?
I guess not, it seems we'll need the shadow file in /etc in order to store the encrypted password. We'll need Seb to create it
04-29-2011 10:53 PM
managed to install the 2.23 us modded version. everything seems to be working fine except netflx and pandora which is not available to apac.
thanks seb. now the fun begins...
I think the main capabilty will work. But not Internet services. If you use them, then you'll need APAC version.
04-30-2011 06:29 AM
Thanks for the suggestion
A sleep 20 makes my autorun.sh work with or without the flash drive. My educated guess is that autorun.sh runs before the USB drives are mounted.
The following script starts samba from a flash drive if present or from usr/local/etc if no flash drive.
The S80samba script in my prior post moves the samba logs to /tmp which appears to be a good thing.
Using the remote to turn the power off briefly and then back on doesn’t kill my telnet session but does remount the flash drive ro and kills samba. /tmp is not cleared on a brief power cycle and autorun.sh doesn’t run.
With this script you have the option of installing optware on a flash drive
#!/bin/sh # start busybox ftp and syslogd cd /usr/local/etc ./busybox-mipsel tcpsvd -vE 0.0.0.0 21 ./busybox-mipsel ftpd -w / & ./busybox-mipsel syslogd -C200 sleep 20 search_list='sda1 sdb1 sdc1' search_done=0; for usb_drive in $search_list; do if test $search_done -eq 0 && [ -d /tmp/usbmounts/$usb_drive/oleg-optware ]; t hen search_done=1; echo "Found optware on usb $usb_drive"; opt_dir="/tmp/usbmounts/$usb_drive/oleg-optware"; umount -l /tmp/usbmounts/$usb_drive; mount /dev/$usb_drive /tmp/usbmounts/$usb_drive; fi; done; if test $search_done -eq 1; then echo "Found optware in " $opt_dir umount -l /opt mount -o bind $opt_dir /opt echo "mounted /opt at " $opt_dir else if [ -d /usr/local/etc/oleg-optware ]; then echo "Found optware in /usr/local/etc"; opt_dir="/usr/local/etc/oleg-optware"; umount -l /opt mount -o bind $opt_dir /opt echo "mounted /opt at " $opt_dir else echo "oleg-optware not found" fi; fi; /opt/etc/init.d/S80samba exit 0 /usr/local/etc #
04-30-2011 01:13 PM
Good call, dm
04-30-2011 01:33 PM
/opt # bin/iotop -o -b -qqq
Could not run iotop as some of the requirements are not met:
- Linux >= 2.6.20 with I/O accounting support (CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING): Not found
- Python >= 2.5 or Python 2.4 with the ctypes module: Found
Too bad! it's a great tool to use. the FAT+ is still on 2.6.12
Linux Venus 22.214.171.124-VENUS #24 Tue Aug 17 22:26:54 CST 2010 mips unknown
04-30-2011 03:26 PM
I agree that checking if opt is already mounted before mounting it is a good thing to do.
However, from my testing when you use the remote to turn the FAT+ “off” or it times out and turns it’s self “off” it does not run the autorun.sh when you use the remote to turn it on. The auto run script is run if you enter the reboot command or physically remove and restore power. If the system actually shutdown when you used the remote to turn it “off” you would not be able to use the remote to turn it on. Since the manual tells you to turn off the FAT+ using the power button on the remote (and because an Ext3 is remounted ro after using the remote to turn the FAT off and on) the USB drives should be ummounted when you use the remote to turn it “off”.
Based on these observations the only way autorun.sh would try to mount opt when it is already mounted is if someone telnets in and manually runs it. Adding the check for opt already mounted to my script that searches the USB drives will prevent this manually attempted double mount. With this check I see no reason to not search the USB drives, not mount opt and not start samba in the autorun script.
The sleep in the script is required to make the USB drive search work but a delay of one or two seconds is likely enough. The umount / mount are also required because the base firmware always mounts Ext3 drive ro.
With my script after a remote “off”/on all I have to do is telnet into the FAT an issue the reboot command which mount opt and starts samba.
The clean way to get samba running automatically after a remote off/on would be to run a different warm start script when the FAT transitions from remote “off “ to on. I don’t know if this is possible within the limitations of mod firmware. Another possibility is some type of cron job that detects that nmbd and/or smbd processes have stopped running for N seconds and runs the warm start script. Either of these options is beyond my Linux skills.
Doing simple edits is not that difficult with VI. The “commands” you need to learn are:
Goggle VI commands if you don’t already know these commands. Both the FAT and the Dockstar have VI built in
On a reboot or physically removing/restoring power tmp is reinitialized. tmp is not reinitialized on a remote “off”/on.
If you use the poweroff command it appears that the system shuts down almost immediately leaving the white light on, the last screen on the TV and the remote input non functional. After a power off command the box is dead until you physically remove and restore power. My conclusion is the poweroff command is useless on a FAT+.
05-01-2011 09:31 AM
Thank you so much dm!!!!
Finally... This Mod-fw2.23, I can change font .ttf to display my country language (Thai) on file/folder name ( .ssa .str subtitle file also works) by using Encoding UTF-8 with adding "mount -o bind /usr/local/etc/Arundina.ttf /usr/local/Resource/ar_egbjk.ttf" in auto_run.sh
It works!!! Even If I reboot FAT+. This will effect to all font display in FAT+ MenuBar, MenuTitle, ChannelName, File Browser,... etc.
Let fun with Mod-fw2.23
Thank you. ^^
05-01-2011 04:06 PM
Mod 2.23 binpack was updated to version 1.1. There are 2 files updated in this version: README.txt and autorun.sh.
Link added in the orginal post.
05-01-2011 06:06 PM
NEVER TYPE REBOOT ...
really , i've corrupted files when typing that. no idea,
im guessing its not a clean shutdown and reboot...
then again my unit seems to corrupt RSS menu files if I just switch away from themsometimes
The problem with the not fully shutting down after mounting I think, was fixed for my by doing a (WITH MY EXT3 drive) umount /opt.
basically it was jamming stuff.
which is odd, because, IF the power off button on the remote just does a simple supend or something then why does it try to umount stuff and then remount it after...
i think the unit just goes into a power sleep mode and then the remote is like hitting a keyboard on a pc that supports wake.
OR someon canread the sourecode...