What's new

post-mount do't work for JFFS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Aleksey Popov

New Around Here
Firmware:380.57, 378.54_2
Entware instaled on jffs through patched entware-setup-jffs.sh script (PART_TYPES='ext2|ext3' -> PART_TYPES='ext2|ext3|jffs'). While instaled only base Entware packages (and xupnpd+liblua) post-mount work fine.
When I add additional packages :
Code:
admin@RT-N66U-2EF0:/tmp/home/root# opkg list-installed
findutils - 4.5.14-1
ldconfig - 0.9.32-2
libc - 0.9.32-2
libgcc - 4.6.4-2
liblua - 5.1.5-1
libpthread - 0.9.32-2
librpc - 2015-04-10-308e9964bfb623773dc0dcc99ef9d18d1551d6ae
librt - 0.9.32-2
libstdcpp - 4.6.4-2
lsof - 4.89-1
lua - 5.1.5-1
luasocket - 3.0-rc1-20130909-3
uclibc-opt - 0.9.32-6
xupnpd - 404-1a
admin@RT-N66U-2EF0:/tmp/home/root#
post-mount does not start.
Modified post-mount :
Code:
#!/bin/sh

i=10; until [ -f /tmp/syslog.log ]; do i=$(($i-1)); if [ "$i" -lt 1 ]; then exit; fi; sleep 1; done

logger -t $(basename $0) "Started for $1"

if [ $1 = "/jffs" ]
then
  ln -nsf "$1"/entware /tmp/opt
  if [ $? -eq "0" ]; then
    logger -t $(basename $0) "Entware dir linked to /opt."
    else  logger -t $(basename $0) "Unable to link Entware dir to /opt."
    fi
  fi
After some time (~ 2 min):
Code:
admin@RT-N66U-2EF0:/tmp/home/root# cat /tmp/syslog.log |grep post-mount
admin@RT-N66U-2EF0:/tmp/home/root#
admin@RT-N66U-2EF0:/tmp/home/root# cat /tmp/syslog.log |grep services-start
Aug  1 03:00:13 custom script: Running /jffs/scripts/services-start
Feb 25 00:51:26 services-start: Could not start Entware services.
After a manual run :
Code:
admin@RT-N66U-2EF0:/tmp/home/root# /jffs/scripts/post-mount /jffs

admin@RT-N66U-2EF0:/tmp/home/root# cat /tmp/syslog.log |grep post-mount
Feb 25 00:53:31 post-mount: Started for /jffs
Feb 25 00:53:31 post-mount: Entware dir linked to /opt.
admin@RT-N66U-2EF0:/tmp/home/root#
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top