Results 1 to 11 of 11

Thread: rc.remote-login not working right

  1. #1
    Join Date
    Sep 2002
    Posts
    65

    rc.remote-login not working right

    My fixsub and tivoweb and cron and noppv and tivoftp and most of the other things arent executing via the rc.remote-login correctly. I understand that this file gets executed by rc.net right after rc.net gets a DHCP address. I put this line in the bottom of rc.remote-login "touch /test" and rebooted. Sure enough /test got created so I know that rc.remote-login is in fact running. I can telnet to the tivo so I guess the 1st command in the rc.remote-login is working, so How can I make everything else get executed right? I have an xtreme2.5'ed T-60 with Kravens Update and the new tivoweb1.9.4. It also looks like the remount part is working as well because after a reboot the / filesystem is readonly

    Thnks for any help heres what the file looks like. I can copy/paste the lines after the system boots and the demons come up but they cant run from the shell script for some reason.

    bash-2.02# cat /etc/rc.d/rc.remote-login
    #!/bin/bash


    1 question....how can i get the logs from when the system boots up and runs all the demons and shell scripts?
    echo "Starting Telnet"
    tnlited 23 /bin/bash -login &

    echo "Starting fixdemo"
    if [ -e /tvbin/fixdemo.tcl ]; then
    /tvbin/fixdemo.tcl >> /dev/null &
    fi

    #echo "Starting TiVoWeb v1.9.3"
    #if [ -e /tivoweb-tcl/httpd-tt.tcl ]; then
    # /tivoweb-tcl/httpd-tt.tcl >> /dev/null &
    #fi

    echo "Starting TivoWeb v1.9.4beta"
    if [ -e /tivoweb-tcl/tivoweb ]; then
    /tivoweb-tcl/tivoweb >> /dev/null &

    echo "Starting TiVoFTPD"
    if [ -e /tivo-bin/tivoftpd ]; then
    /tivo-bin/tivoftpd >> /dev/null &
    fi

    #echo "Starting SMBFS"
    #if [ -e /lib/modules/smbfs.o ]; then
    # insmod -f /lib/modules/smbfs.o

    echo "Starting NFS"
    if [ -e /lib/modules/nfs.o ]; then
    insmod -f /lib/modules/nfs.o
    fi

    echo "Enabling Showcases"
    if [ -e /tvbin/sc.tcl ]; then
    /tvbin/sc.tcl &
    fi

    echo "Unscrambling"
    if [ -e /lib/modules/noscramble.o ]; then
    insmod -f /lib/modules/noscramble.o
    fi

    echo "Remounting / ReadOnly"
    mount -o remount,ro /

    echo "Starting cron"
    if [ -e /var/hack/cron ]; then
    /var/hack/cron

    echo "Starting fixsub"
    if [ -e /etc/SubTest ]; then
    if [ -x /tvbin/fixsub.tcl ]; then
    /tvbin/fixsub.tcl &
    fi
    fi
    bash-2.02#

  2. #2
    Join Date
    Oct 2001
    Location
    Out West
    Posts
    3,171
    Files not in correct directory?

    Files not chmod'ed?

    Files corrupt?

    Try executing the script commands one by one from bash, and see if they work when run manually.

  3. #3
    Join Date
    Oct 2002
    Posts
    15
    I was having similar problems, except i had wanted a static ip address. I had to comment out a line in rc.net to get rc.remote-login to execute properly.

    According to Kraven's upgrade, if you wanted a static ip address, u edited a line in rc.remote-login. Well that was not executing, as well as all the other programs it was calling.

    here is the line i edited in rc.net, then all was well after that

    # /sbin/dhclient -q "$DYNAMIC_NET_DEV" 2>/dev/null &

    but, beware, if u arent setting a static ip, this might not let u get an ip address from dhcp.

    Good Luck

  4. #4
    Join Date
    Sep 2002
    Posts
    65
    hey i figured it out. im missing a few "fi" (end if) command from the script.

    im still learning shell scripting. what does "if [ -x" and "if [ -e" do? are there any other options besides -e and -x?

    Thanks,
    OC

  5. #5
    Join Date
    Dec 2001
    Posts
    204

    builtins

    Code:
    -e              Exists
    -z              Exists and is zero bytes in size
    -s              Exists and is non-zero bytes in size
    -r              Is readable
    -w              Is writable
    -x              Is executable
    -T              Is text
    -B              Is binary
    A few more, why not
    Code:
    -d              Is a directory
    -h              Is a Symlink
    -c              Is a charactor device file
    -b              Is a block device file
    -p              Is a named pipe file
    -f              Is a normal file (not to be confused with -e above)
    -n              Not (as in negate)
    -eq             Is equal
    Last edited by Torg; 10-09-2002 at 10:25 PM.

  6. #6
    Join Date
    Sep 2001
    Posts
    458
    I don't think you need to redirect tivoweb to null. It does that by default.

    Also, I haven't looked to how it ended up in Kraven's release, but there is no reason to edit rc.net at all. If you want a static IP instead of dynamic, you just need to make some minor changes in rc.arch. They may even be commented.

    You also appear to be running alot of stuff needlessly at bootup. You may want to prune out a bunch of that.

  7. #7
    Join Date
    Sep 2002
    Posts
    65
    other than nfs what else should i take out?

  8. #8
    Join Date
    Dec 2001
    Posts
    204
    Remove anything you don't regularly use. Then
    again they really don't add much overhead to the box execpt when you use them.

    The NFS and SMB modules only add to the filesystems telling it how to handle those types of fs calls. They are not the deamons to export those filesystems.

    So really what you have is fine.

  9. #9
    Join Date
    Oct 2001
    Posts
    26
    This is the exact same problem Ive been having, posted the problem in another thread... I just re-xtremed my drives thinking that might do it, but still the same problem. Nothing is executing in my rc.remote-login...

    So..was it that you need some if end statements, or something has to be modified elsewhere? Possible to get someones rc.remote-login if it just needs to be modified. I've followed everything exactly multiple times, but still not executing..
    thanks!

  10. #10
    Join Date
    Sep 2002
    Posts
    65
    the one I posted as this thread starter will work as long as you put the "fi" statements at the end of the tivoweb1.9.4beta section and the cron section. If you didnt install tivoweb1.9.4 and cron then just remove/comment out those sections and the file should work for you.

    also you should check your /etc/rc.d/rc.net file as the rc.remote-login gets run from the rc.net file.

    -OC

  11. #11
    Join Date
    Oct 2001
    Posts
    26
    Thanks... actually I had commented out this line in rc.net

    # /sbin/dhclient -q "$DYNAMIC_NET_DEV" 2>/dev/null &

    as stated above, and now its working..

    I also had what looks like too many "fi"s in rc.net :

    Before
    ---------
    if [ "$DEBUG_BOARD" != true -o "$dhcp" == true ]; then
    if detectDynamicNet; then
    mkdir -p /var/state/dhcp
    /sbin/dhclient -q "$DYNAMIC_NET_DEV" 2>/dev/null &
    fi
    fi
    /etc/rc.d/rc.remote-login &


    Afterworking)
    -------------------
    if [ "$DEBUG_BOARD" != true -o "$dhcp" == true ]; then
    if detectDynamicNet; then
    mkdir -p /var/state/dhcp
    # /sbin/dhclient -q "$DYNAMIC_NET_DEV" 2>/dev/null &
    fi

    /etc/rc.d/rc.remote-login &
    fi


    I first tried by putting one of the "fi" after the call to remote-login, but still didnt work, I then commented out the line for dhcp, and it now works (I have a static IP set in rc.remote-login as per kravens update instructions

    So far everything looks good though!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •