Re: [SLE] automatic configuration of network interfaces (ifplugd?)

From: Osho GG (oshogg_at_gmail.com)
Date: 10/09/04

  • Next message: Branimir Vasilic: "Re: [SLE] new v9.2 is out"
    Date: Fri, 8 Oct 2004 15:42:26 -0700
    To: James Oakley <joakley@solutioninc.com>
    
    

    Hi,

    I tried changing to /sbin/ip route and then the script went past that.
    I did some more debugging to figure out what was going on. What I
    found was that if I put the following at the very top

    echo BEFORE
    false
    echo AFTER

    The script would never reach till AFTER. This was because of set -e
    line. I removed the set -e line and then I will get both BEFORE and
    AFTER. Reading sh man page seems to indicate that doing "set -e"
    forces the script to exit immediately if any of it's "untested"
    command exits with non-zero values. I removed set -e and now it is
    working as expected.

    thanks for your help,
    Osho

    On Fri, 8 Oct 2004 15:27:08 -0300, James Oakley <joakley@solutioninc.com> wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > On Friday 08 October 2004 2:16 am, Osho GG wrote:
    > > Thanks much for the detailed instructions. This worked for me.
    > > Whenever either of the interface is up, I see that ifplugd gets a
    > > notification (I see the messages in /var/log/messages). It worked
    > > consistently or wired and wireless both - so far.
    > >
    > > The only issue I have is that when an interface goes down, the script
    > > doesn't reach after
    > >
    > > /sbin/ip route | grep -q "$SLOW_INTERFACE"
    > >
    > > I put echo statement before and after this statement like
    > >
    > > echo before
    > > /sbin/ip route | grep -q "$SLOW_INTERFACE"
    > > echo after
    > >
    > > Only the before is seen in /var/log/messages, after is not. I also see
    > > a message saying the script exited with exit status 1 or 2.
    > >
    > > If I execute the same /sbin/ip route | grep -q eth0 or /sbin/ip route
    > >
    > > | grep -q eth1 command on the command line - I never see that it exits
    > >
    > > with some other status. So, I removed that check and the script now
    > > kinda works.
    > >
    > > Any idea what could be wrong?
    >
    > That's really strange. I don't have that problem.
    >
    > What does it say if you change:
    >
    > /sbin/ip route | grep -q "$SLOW_INTERFACE"
    >
    > to simply:
    >
    > /sbin/ip route
    >
    >
    > - --
    > James Oakley
    > Engineering - SolutionInc Ltd.
    > joakley@solutioninc.com
    > http://www.solutioninc.com
    > -----BEGIN PGP SIGNATURE-----
    > Version: GnuPG v1.2.4 (GNU/Linux)
    >
    > iD8DBQFBZtwN4U2uQswGyDcRAjE7AJ9wV8sZXPOMaUWrpm6qZ4Y0SuRyxwCfRPU5
    > xG7ua5sUdPCodeLU04WzLmU=
    > =JDuW
    >
    >
    > -----END PGP SIGNATURE-----
    >
    > --
    > Check the headers for your unsubscription address
    > For additional commands send e-mail to suse-linux-e-help@suse.com
    > Also check the archives at http://lists.suse.com
    > Please read the FAQs: suse-linux-e-faq@suse.com
    >
    >

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Branimir Vasilic: "Re: [SLE] new v9.2 is out"

    Relevant Pages

    • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
      ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
      (Full-Disclosure)
    • Ripping Tapes with Linux--How To
      ... the full script is located in the BASH ... My tape player is a portable style journalist's recorder from the ... The most irritating part of the recording process was setting the ... echo Starting de-noise procedure to file $TMP1 ...
      (comp.os.linux.misc)
    • Re: Linux Backup with Modification Date Filter?
      ... I wrote a bash script that acts as a wrapper to rsnapshot which first ... generates a modification-date filter, ...
      (comp.os.linux.misc)
    • Re: [SLE] Changing from Java 1.4 to Java 1.5 using Yast
      ... > your 'script' does not seem to work. ... > full quoted previous posts that you put your post above ... > Check the headers for your unsubscription address ...
      (SuSE)
    • Re: Command Script variable value lost during execution
      ... The value of RC_ver is numeric but ECHO would return it numeric or not... ... I checked ERRORLEVEL at the end of the script and it was 0 but again ... ECHO RoboCopy version xxx%RC_Ver%yyy ... CALL:GetRCVer RoboCopy.exe /Path ...
      (microsoft.public.windows.server.scripting)