Loading ...
Sorry, an error occurred while loading the content.
 

AutoStart Script when NSLU2 Boots up!

Expand Messages
  • vi_sharan
    Hi All, Tried just about everything...so plz guide where am I wrong? 1. Created a script named it S99twonky and placed it inside /opt/etc/init.d 2. Chmod 755
    Message 1 of 4 , Sep 29, 2008
      Hi All, Tried just about everything...so plz guide where am I wrong?
      1. Created a script named it S99twonky and placed it inside
      /opt/etc/init.d
      2. Chmod 755 S99twonky
      3. DO_Reboot
      4. ps -f [I dont see my script running]

      # **********************************************************
      #!/bin/sh

      killall smbmount 2 >/dev/null
      sleep 1

      smbmount "//192.168.1.113/disk 1" /share/myslug/disk1_media -o
      username=guest,password=twonky

      smbmount "//192.168.1.113/disk 2" /share/myslug/disk2_media -o
      username=guest,password=twonky

      echo "Smb Mount Created"

      killall twonkymedia 2 >/dev/null
      /share/hdd/data/HDD_1_1_1/twonkyvision/twonkymedia &

      # **********************************************************
    • Kirk Wallace
      ... I am not at all an expert, but the S99twonky file may need to be in, or linked to the /etc/rc.d directory. The files in my /etc/rc.d are all 777 instead of
      Message 2 of 4 , Sep 29, 2008
        On Tue, 2008-09-30 at 00:55 +0000, vi_sharan wrote:
        > Hi All, Tried just about everything...so plz guide where am I wrong?
        > 1. Created a script named it S99twonky and placed it inside
        > /opt/etc/init.d
        > 2. Chmod 755 S99twonky
        > 3. DO_Reboot
        > 4. ps -f [I dont see my script running]
        >
        > # **********************************************************
        > #!/bin/sh
        >
        > killall smbmount 2 >/dev/null
        > sleep 1
        >
        > smbmount "//192.168.1.113/disk 1" /share/myslug/disk1_media -o
        > username=guest,password=twonky
        >
        > smbmount "//192.168.1.113/disk 2" /share/myslug/disk2_media -o
        > username=guest,password=twonky
        >
        > echo "Smb Mount Created"
        >
        > killall twonkymedia 2 >/dev/null
        > /share/hdd/data/HDD_1_1_1/twonkyvision/twonkymedia &
        >
        > # **********************************************************

        I am not at all an expert, but the S99twonky file may need to be in, or
        linked to the /etc/rc.d directory. The files in my /etc/rc.d are all 777
        instead of 755, but I don't think that should be a problem for boot-up.

        Another thing that comes to mind is that the "S99t..." will make your
        script execute after (for example) S99dmesgbackup and before S99sysctl.
        If that is okay, then leave it alone. If you want the script to execute
        earlier, then make 99 a smaller number.

        Good luck.

        Kirk
      • Scott Ruckh
        This is what you said vi_sharan ... Nothing in /opt/etc/init.d is run at boot. I am not sure which OS you are running, but you will need to link your script to
        Message 3 of 4 , Sep 30, 2008
          This is what you said vi_sharan
          > Hi All, Tried just about everything...so plz guide where am I wrong?
          > 1. Created a script named it S99twonky and placed it inside
          > /opt/etc/init.d
          > 2. Chmod 755 S99twonky
          > 3. DO_Reboot
          > 4. ps -f [I dont see my script running]
          >
          > # **********************************************************
          > #!/bin/sh
          >
          > killall smbmount 2 >/dev/null
          > sleep 1
          >
          > smbmount "//192.168.1.113/disk 1" /share/myslug/disk1_media -o
          > username=guest,password=twonky
          >
          > smbmount "//192.168.1.113/disk 2" /share/myslug/disk2_media -o
          > username=guest,password=twonky
          >
          > echo "Smb Mount Created"
          >
          > killall twonkymedia 2 >/dev/null
          > /share/hdd/data/HDD_1_1_1/twonkyvision/twonkymedia &
          >
          > # **********************************************************
          >
          Nothing in /opt/etc/init.d is run at boot.

          I am not sure which OS you are running, but you will need to link your script
          to one of the run-level directories (/etc/rc#.d).

          Most likely the /etc/rc3.d would be a good place to start.
        • vi_sharan
          Thanks for all the problem, S99 was delaying the start, decreasing it to S40 made it all work ... wrong? ... your script
          Message 4 of 4 , Oct 2, 2008
            Thanks for all the problem, S99 was delaying the start, decreasing it
            to S40 made it all work

            --- In nslu2-linux@yahoogroups.com, "Scott Ruckh" <sruckh@...> wrote:
            >
            >
            >
            > This is what you said vi_sharan
            > > Hi All, Tried just about everything...so plz guide where am I
            wrong?
            > > 1. Created a script named it S99twonky and placed it inside
            > > /opt/etc/init.d
            > > 2. Chmod 755 S99twonky
            > > 3. DO_Reboot
            > > 4. ps -f [I dont see my script running]
            > >
            > > # **********************************************************
            > > #!/bin/sh
            > >
            > > killall smbmount 2 >/dev/null
            > > sleep 1
            > >
            > > smbmount "//192.168.1.113/disk 1" /share/myslug/disk1_media -o
            > > username=guest,password=twonky
            > >
            > > smbmount "//192.168.1.113/disk 2" /share/myslug/disk2_media -o
            > > username=guest,password=twonky
            > >
            > > echo "Smb Mount Created"
            > >
            > > killall twonkymedia 2 >/dev/null
            > > /share/hdd/data/HDD_1_1_1/twonkyvision/twonkymedia &
            > >
            > > # **********************************************************
            > >
            > Nothing in /opt/etc/init.d is run at boot.
            >
            > I am not sure which OS you are running, but you will need to link
            your script
            > to one of the run-level directories (/etc/rc#.d).
            >
            > Most likely the /etc/rc3.d would be a good place to start.
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.