1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NAS 200 startup scripts

Discussion in 'Cisco/Linksys Network Storage Devices' started by fubarbloke, Dec 24, 2008.

  1. fubarbloke

    fubarbloke Addicted to LI Member

    I've been trying to re-install dsc68's rsync implementation under the Jac2a firmware (which overall is working great!). rsync can be launched manually and runs fine. Same with the startup script (rc.rsyncd) I was using under Jac0. Same with the rc.xxx test files I've written. But it doesn't look like the startup scripts are running at startup.

    I've tried booting (/etc/rc.d/rc.reboot) with only rc.rsyncd installed and with both rc.rsyncd and a couple of test scripts installed in the /harddisk/volume_1/data/rc.d directory. Tried the same in the /harddisk/volume_2/data/rc.d directory. I tried changing around ownership and permissions. Same result everytime:

    - There's no indication or evidence that the scripts ran. (Unlike when run manually).
    - Permissions and owner/group, when not 777 root:root, are not changed.

    I tried running rc.local, rc.init, rc.1 and rc.0 manually (I don't think it's a smart thing to do :rolleyes: - I had to powercycle to get the NAS back running finally). Didn't recognize any anomalies (which is not to say there weren't any). When rc.0 (which launches the startup scripts) ran, the output went right from resetting the time to rc.1:

    Code:
    Restore time and timezone:
    12/24/2008-12:18:05 
    Restore usrgrpshares:
    
    I also tried modifying and deleting the scriptdirs.txt file in volume_1/conf (and rebooting, of course). Same result.

    Then I tried running a test script as early.sh in volume_1/conf, which worked fine. I copied rc.rsyncd to volume_1/conf and renamed it early.sh. It worked fine too.

    There doesn't seem to be anything wrong with the scripts -- they run manually and at startup as early.sh. And rc.0 isn't changing ownerships or permissions.

    For now, I'm running my rc.rsyncd script as volume_1/conf/early.sh:

    Code:
    #!/bin/sh
    
    ln -s /harddisk/volume_1/conf/rsyncd.conf /etc/rsyncd.conf
    echo "rsync stream tcp nowait root /harddisk/volume_1/conf/bin/rsync --daemon" >>/etc/inetd.conf
    echo "0 20 * * * root /harddisk/volume_1/data/bin/mirror.sh &>/dev/null" >>/etc/crontab
    touch /harddisk/volume_1/conf/earlyrsync.txt
    The final touch command is there as a diagnostic. So far, it's run properly when the other commands show evidence of running properly, and not otherwise.

    It's hard to tell, but judging from some of the things that the people having trouble with the twonky server have written, they might be experiencing the same or similar condition.
     
  2. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    You appear to be right, I can't believe I didn't notice that. It looks like there's another bug in the scripts that are supposed to pick up the custom scripts. I will try to fix it as soon as possible.

    :oops: :wall:

    ===Jac
     
  3. fubarbloke

    fubarbloke Addicted to LI Member

    It's a sweet bit of coding, Jac -- the work is much appreciated. Don't sweat a bug or two, that's part of the fun (although it may not always seem that way...).

    Merry Christmas! :rockon:
     

Share This Page