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

a basic question about startup scripts

Expand Messages
  • Michael Perelmutter
    Hello, I m using suse 9.2 and I need to run a certain command as root on startup (more specifically, i need to change my mtu to 1492, otherwise my internet
    Message 1 of 6 , Apr 2 10:22 AM
    View Source
    • 0 Attachment
      Hello,
      I'm using suse 9.2 and I need to run a certain command
      as root on startup (more specifically, i need to
      change my mtu to 1492, otherwise my internet won't
      work).

      so I created a file, which had this one line:

      /sbin/ifconfig eth0 mtu 1492

      and named it mtu.sh

      now, various howtos i have read mention editing
      scripts in /etc/init.d; however none of them go into
      much detail about this. do i put my file in the init.d
      directory? or do i edit one of the scripts already in
      there? which one do i edit and where do i put that
      line?

      thanks,
      Michael.




      __________________________________
      Do you Yahoo!?
      Yahoo! Small Business - Try our new resources site!
      http://smallbusiness.yahoo.com/resources/
    • Shlomi Fish
      ... Well, first of all the entire file needs to be:
      Message 2 of 6 , Apr 2 10:52 AM
      View Source
      • 0 Attachment
        On Saturday 02 April 2005 21:22, Michael Perelmutter wrote:
        > Hello,
        > I'm using suse 9.2 and I need to run a certain command
        > as root on startup (more specifically, i need to
        > change my mtu to 1492, otherwise my internet won't
        > work).
        >
        > so I created a file, which had this one line:
        >
        > /sbin/ifconfig eth0 mtu 1492
        >
        > and named it mtu.sh

        Well, first of all the entire file needs to be:

        <<<
        #!/bin/sh
        /sbin/ifconfig eth0 mtu 1492
        >>>

        (with the sha-bang (#!) line)

        Then you need to make it executable by issuing the command "chmod +x" on the
        file.

        >
        > now, various howtos i have read mention editing
        > scripts in /etc/init.d; however none of them go into
        > much detail about this. do i put my file in the init.d
        > directory?

        Yes. Name it /etc/init.d/set-mtu.sh or something like this.

        > or do i edit one of the scripts already in
        > there? which one do i edit and where do i put that
        > line?
        >

        In order to activate it, you have to symlink this file from all the run-levels
        in which it should run. Just use the command:

        cd /etc/rc.d/rc3.d # Or whatever run-level number
        ln -s /etc/init.d/set-mtu.sh 50set-mtu

        Regards,

        Shlomi Fish

        ---------------------------------------------------------------------
        Shlomi Fish shlomif@...
        Homepage: http://www.shlomifish.org/

        Hacker sees bug. Hacker fixes bug.
      • Michael Perelmutter
        did in accordance with the below steps. doesn t work and mtu stays on 500 on startup. any suggestions? ... Well, first of all the entire file needs to be:
        Message 3 of 6 , Apr 3 4:03 PM
        View Source
        • 0 Attachment
          did in accordance with the below steps. doesn't work and mtu stays on 500 on startup. any suggestions?

          Shlomi Fish <shlomif@...> wrote:
          On Saturday 02 April 2005 21:22, Michael Perelmutter wrote:
          > Hello,
          > I'm using suse 9.2 and I need to run a certain command
          > as root on startup (more specifically, i need to
          > change my mtu to 1492, otherwise my internet won't
          > work).
          >
          > so I created a file, which had this one line:
          >
          > /sbin/ifconfig eth0 mtu 1492
          >
          > and named it mtu.sh

          Well, first of all the entire file needs to be:

          <<<
          #!/bin/sh
          /sbin/ifconfig eth0 mtu 1492
          >>>

          (with the sha-bang (#!) line)

          Then you need to make it executable by issuing the command "chmod +x" on the
          file.

          >
          > now, various howtos i have read mention editing
          > scripts in /etc/init.d; however none of them go into
          > much detail about this. do i put my file in the init.d
          > directory?

          Yes. Name it /etc/init.d/set-mtu.sh or something like this.

          > or do i edit one of the scripts already in
          > there? which one do i edit and where do i put that
          > line?
          >

          In order to activate it, you have to symlink this file from all the run-levels
          in which it should run. Just use the command:

          cd /etc/rc.d/rc3.d          # Or whatever run-level number
          ln -s /etc/init.d/set-mtu.sh 50set-mtu

          Regards,

                Shlomi Fish

          ---------------------------------------------------------------------
          Shlomi Fish      shlomif@...
          Homepage:        http://www.shlomifish.org/

          Hacker sees bug. Hacker fixes bug.


          Do you Yahoo!?
          Yahoo! Small Business - Try our new resources site!
        • Shlomi Ben-Tzvi
          hi, i have similar question to Michael, i m using fc1, i put a .bash_profile script on the user home directory and i dont succeed making the user operate it
          Message 4 of 6 , Apr 6 1:50 AM
          View Source
          • 0 Attachment
            hi,
            i have similar question to Michael,
            i'm using fc1, i put a .bash_profile script on the user home directory
            and i dont succeed making the user operate it when logged in.
            how do i make it work
            thanks
            shlomi.
            --- Michael Perelmutter <perelmum@...> wrote:
            > did in accordance with the below steps. doesn't work and mtu stays on
            > 500 on startup. any suggestions?
            >
            > Shlomi Fish <shlomif@...> wrote:On Saturday 02 April 2005 21:22,
            > Michael Perelmutter wrote:
            > > Hello,
            > > I'm using suse 9.2 and I need to run a certain command
            > > as root on startup (more specifically, i need to
            > > change my mtu to 1492, otherwise my internet won't
            > > work).
            > >
            > > so I created a file, which had this one line:
            > >
            > > /sbin/ifconfig eth0 mtu 1492
            > >
            > > and named it mtu.sh
            >
            > Well, first of all the entire file needs to be:
            >
            > <<<
            > #!/bin/sh
            > /sbin/ifconfig eth0 mtu 1492
            > >>>
            >
            > (with the sha-bang (#!) line)
            >
            > Then you need to make it executable by issuing the command "chmod +x" on
            > the
            > file.
            >
            > >
            > > now, various howtos i have read mention editing
            > > scripts in /etc/init.d; however none of them go into
            > > much detail about this. do i put my file in the init.d
            > > directory?
            >
            > Yes. Name it /etc/init.d/set-mtu.sh or something like this.
            >
            > > or do i edit one of the scripts already in
            > > there? which one do i edit and where do i put that
            > > line?
            > >
            >
            > In order to activate it, you have to symlink this file from all the
            > run-levels
            > in which it should run. Just use the command:
            >
            > cd /etc/rc.d/rc3.d # Or whatever run-level number
            > ln -s /etc/init.d/set-mtu.sh 50set-mtu
            >
            > Regards,
            >
            > Shlomi Fish
            >
            > ---------------------------------------------------------------------
            > Shlomi Fish shlomif@...
            > Homepage: http://www.shlomifish.org/
            >
            > Hacker sees bug. Hacker fixes bug.
            >
            >
            > ---------------------------------
            > Yahoo! Groups Links
            >
            > To visit your group on the web, go to:
            > http://groups.yahoo.com/group/gnubies-il/
            >
            > To unsubscribe from this group, send an email to:
            > gnubies-il-unsubscribe@yahoogroups.com
            >
            > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
            >
            >
            >
            >
            > ---------------------------------
            > Do you Yahoo!?
            > Yahoo! Small Business - Try our new resources site!



            __________________________________
            Do you Yahoo!?
            Yahoo! Personals - Better first dates. More second dates.
            http://personals.yahoo.com
          • Shlomi Fish
            ... Well, it should work. I can t tell you right away why it doesn t, but maybe: 1. Are you sure it s $HOME/.bash_profile? 2. Are you doing an X-login? 3. Is
            Message 5 of 6 , Apr 6 2:00 AM
            View Source
            • 0 Attachment
              On Wednesday 06 April 2005 11:50, Shlomi Ben-Tzvi wrote:
              > hi,
              > i have similar question to Michael,
              > i'm using fc1, i put a .bash_profile script on the user home directory
              > and i dont succeed making the user operate it when logged in.
              > how do i make it work
              > thanks
              > shlomi.
              >

              Well, it should work. I can't tell you right away why it doesn't, but maybe:

              1. Are you sure it's $HOME/.bash_profile?

              2. Are you doing an X-login?

              3. Is it readable by the current user?

              Regards,

              Shlomi Fish

              > --- Michael Perelmutter <perelmum@...> wrote:
              > > did in accordance with the below steps. doesn't work and mtu stays on
              > > 500 on startup. any suggestions?
              > >
              > > Shlomi Fish <shlomif@...> wrote:On Saturday 02 April 2005 21:22,
              > >
              > > Michael Perelmutter wrote:
              > > > Hello,
              > > > I'm using suse 9.2 and I need to run a certain command
              > > > as root on startup (more specifically, i need to
              > > > change my mtu to 1492, otherwise my internet won't
              > > > work).
              > > >
              > > > so I created a file, which had this one line:
              > > >
              > > > /sbin/ifconfig eth0 mtu 1492
              > > >
              > > > and named it mtu.sh
              > >
              > > Well, first of all the entire file needs to be:
              > >
              > > <<<
              > > #!/bin/sh
              > > /sbin/ifconfig eth0 mtu 1492
              > >
              > >
              > > (with the sha-bang (#!) line)
              > >
              > > Then you need to make it executable by issuing the command "chmod +x" on
              > > the
              > > file.
              > >
              > > > now, various howtos i have read mention editing
              > > > scripts in /etc/init.d; however none of them go into
              > > > much detail about this. do i put my file in the init.d
              > > > directory?
              > >
              > > Yes. Name it /etc/init.d/set-mtu.sh or something like this.
              > >
              > > > or do i edit one of the scripts already in
              > > > there? which one do i edit and where do i put that
              > > > line?
              > >
              > > In order to activate it, you have to symlink this file from all the
              > > run-levels
              > > in which it should run. Just use the command:
              > >
              > > cd /etc/rc.d/rc3.d # Or whatever run-level number
              > > ln -s /etc/init.d/set-mtu.sh 50set-mtu
              > >
              > > Regards,
              > >
              > > Shlomi Fish
              > >
              > > ---------------------------------------------------------------------
              > > Shlomi Fish shlomif@...
              > > Homepage: http://www.shlomifish.org/
              > >
              > > Hacker sees bug. Hacker fixes bug.
              > >
              > >
              > > ---------------------------------
              > > Yahoo! Groups Links
              > >
              > > To visit your group on the web, go to:
              > > http://groups.yahoo.com/group/gnubies-il/
              > >
              > > To unsubscribe from this group, send an email to:
              > > gnubies-il-unsubscribe@yahoogroups.com
              > >
              > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
              > >
              > >
              > >
              > >
              > > ---------------------------------
              > > Do you Yahoo!?
              > > Yahoo! Small Business - Try our new resources site!
              >
              > __________________________________
              > Do you Yahoo!?
              > Yahoo! Personals - Better first dates. More second dates.
              > http://personals.yahoo.com
              >
              >
              >
              >
              > Yahoo! Groups Links
              >
              >
              >

              --

              ---------------------------------------------------------------------
              Shlomi Fish shlomif@...
              Homepage: http://www.shlomifish.org/

              Hacker sees bug. Hacker fixes bug.
            • Shlomi Ben-Tzvi
              hi, yes, yes, and yes yes-checked it s home dir is correct no - it happens all the time, telnet,x-login or even su from root... yes-he s the owner anyone - any
              Message 6 of 6 , Apr 7 5:48 AM
              View Source
              • 0 Attachment
                hi,
                yes, yes, and yes
                yes-checked it's home dir is correct
                no - it happens all the time, telnet,x-login or even su from root...
                yes-he's the owner

                anyone - any other idea directions for me ?

                thank
                --- Shlomi Fish <shlomif@...> wrote:
                > On Wednesday 06 April 2005 11:50, Shlomi Ben-Tzvi wrote:
                > > hi,
                > > i have similar question to Michael,
                > > i'm using fc1, i put a .bash_profile script on the user home
                > directory
                > > and i dont succeed making the user operate it when logged in.
                > > how do i make it work
                > > thanks
                > > shlomi.
                > >
                >
                > Well, it should work. I can't tell you right away why it doesn't, but
                > maybe:
                >
                > 1. Are you sure it's $HOME/.bash_profile?
                >
                > 2. Are you doing an X-login?
                >
                > 3. Is it readable by the current user?
                >
                > Regards,
                >
                > Shlomi Fish
                >
                > > --- Michael Perelmutter <perelmum@...> wrote:
                > > > did in accordance with the below steps. doesn't work and mtu stays
                > on
                > > > 500 on startup. any suggestions?
                > > >
                > > > Shlomi Fish <shlomif@...> wrote:On Saturday 02 April 2005
                > 21:22,
                > > >
                > > > Michael Perelmutter wrote:
                > > > > Hello,
                > > > > I'm using suse 9.2 and I need to run a certain command
                > > > > as root on startup (more specifically, i need to
                > > > > change my mtu to 1492, otherwise my internet won't
                > > > > work).
                > > > >
                > > > > so I created a file, which had this one line:
                > > > >
                > > > > /sbin/ifconfig eth0 mtu 1492
                > > > >
                > > > > and named it mtu.sh
                > > >
                > > > Well, first of all the entire file needs to be:
                > > >
                > > > <<<
                > > > #!/bin/sh
                > > > /sbin/ifconfig eth0 mtu 1492
                > > >
                > > >
                > > > (with the sha-bang (#!) line)
                > > >
                > > > Then you need to make it executable by issuing the command "chmod
                > +x" on
                > > > the
                > > > file.
                > > >
                > > > > now, various howtos i have read mention editing
                > > > > scripts in /etc/init.d; however none of them go into
                > > > > much detail about this. do i put my file in the init.d
                > > > > directory?
                > > >
                > > > Yes. Name it /etc/init.d/set-mtu.sh or something like this.
                > > >
                > > > > or do i edit one of the scripts already in
                > > > > there? which one do i edit and where do i put that
                > > > > line?
                > > >
                > > > In order to activate it, you have to symlink this file from all the
                > > > run-levels
                > > > in which it should run. Just use the command:
                > > >
                > > > cd /etc/rc.d/rc3.d # Or whatever run-level number
                > > > ln -s /etc/init.d/set-mtu.sh 50set-mtu
                > > >
                > > > Regards,
                > > >
                > > > Shlomi Fish
                > > >
                > > >
                > ---------------------------------------------------------------------
                > > > Shlomi Fish shlomif@...
                > > > Homepage: http://www.shlomifish.org/
                > > >
                > > > Hacker sees bug. Hacker fixes bug.
                > > >
                > > >
                > > > ---------------------------------
                > > > Yahoo! Groups Links
                > > >
                > > > To visit your group on the web, go to:
                > > > http://groups.yahoo.com/group/gnubies-il/
                > > >
                > > > To unsubscribe from this group, send an email to:
                > > > gnubies-il-unsubscribe@yahoogroups.com
                > > >
                > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                > Service.
                > > >
                > > >
                > > >
                > > >
                > > > ---------------------------------
                > > > Do you Yahoo!?
                > > > Yahoo! Small Business - Try our new resources site!
                > >
                > > __________________________________
                > > Do you Yahoo!?
                > > Yahoo! Personals - Better first dates. More second dates.
                > > http://personals.yahoo.com
                > >
                > >
                > >
                > >
                > > Yahoo! Groups Links
                > >
                > >
                > >
                >
                > --
                >
                > ---------------------------------------------------------------------
                > Shlomi Fish shlomif@...
                > Homepage: http://www.shlomifish.org/
                >
                > Hacker sees bug. Hacker fixes bug.
                >



                __________________________________
                Do you Yahoo!?
                Yahoo! Personals - Better first dates. More second dates.
                http://personals.yahoo.com
              Your message has been successfully submitted and would be delivered to recipients shortly.