What's new

Scripts from /jffs/scripts not running

  • 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!

spl

Occasional Visitor
Hi.
I have modified startup scripts from github

Code:
admin@RT-N66U:/tmp/home/root# ls -la /jffs/scripts
drwxrwxrwx    2 admin    root             0 Oct  1 18:03 .
drwxr-xr-x    5 admin    root             0 Jan  1  1970 ..
-r-xr-xr-x    1 admin    root           234 Oct  1 18:44 firewall-start.sh
-r-xr-xr-x    1 admin    root            41 Oct  1 18:56 init-start.sh
-r-xr-xr-x    1 admin    root           234 Oct  1 16:25 nat-start.sh
-r-xr-xr-x    1 admin    root            50 Sep 30 21:51 post-mount.sh
-r-xr-xr-x    1 admin    root           209 Oct  1 18:40 pre-mount.sh
-r-xr-xr-x    1 admin    root           234 Oct  1 18:08 services-start.sh
-r-xr-xr-x    1 admin    root           458 Sep 30 21:52 services-stop.sh
-r-xr-xr-x    1 admin    root           234 Oct  1 16:24 unmount.sh
-r-xr-xr-x    1 admin    root            90 Sep 30 21:51 wan-start.sh

for exampe i show services-start.sh
Code:
admin@RT-N66U:/tmp/home/root# cat /jffs/scripts/services-start.sh
#!/bin/sh


echo 1.txt >> '/mnt/sda1/1.txt';
rm -R /mnt/sda1/test/;
echo 2.txt >> '/mnt/sda1/2.txt';
mkdir /mnt/sda1/test/;
echo 3.txt >> '/mnt/sda1/3.txt'
chmod -R 755 /mnt/sda1/test/;
echo 4.txt >> '/mnt/sda1/4.txt';
nvram jffs settings
admin@RT-N66U:/tmp/home/root# nvram show | grep jffs
jffs2_on=1
size: 44244 bytes (21292 left)
jffs2_exec=1
jffs2_size=6291456
jffs2_format=0

If i right understand after boot and mount partitions on my sda1 i see 4 files and 1 folder.
But it not happening.
What i do wrong?
Thanks for advice.
 
Last edited:
Recheck your filenames. There should not be any ".sh" in their names.
 
Recheck your filenames. There should not be any ".sh" in their names.

Thanks a lot.
It works.
I miss this little thing

About this error's:

Code:
Jan  1 02:00:11 hotplug[385]: USB /dev/sda1(ext4) failed to mount at the first try!
Jan  1 02:00:11 kernel: kjournald starting.  Commit interval 5 seconds
Jan  1 02:00:11 kernel: EXT3 FS on sda1, internal journal
Jan  1 02:00:11 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan  1 02:00:11 hotplug[385]: USB ext4 fs at /dev/sda1 mounted on /tmp/mnt/sda1

i need to cteate another topic?

It's on my flash and on external hdd's
I try to format my devices into ext2, ext3, ntfs, vfat from windows(acronis) and from router
Only vfat FS dosen't have this error on startup
SD cards 8 and 32 Gb's
HDD's 250Gb and 1TB
Rack is Welland ME-280J
 
Ignore this error. It's just a minor issue where the firmware tries to mount ext2/ext3 volumes as ext4 first. It will still mount properly.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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