SCIENTIFIC-LINUX-USERS Archives

October 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 13 Oct 2011 20:13:54 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
On 2011/10/13 05:45, Vladimir Mosgalin wrote:
> Hi jdow!
>
>   On 2011.10.12 at 18:28:02 -0700, jdow wrote next:
>
>>>>   Is it possible under SL6.1 to run a script (or insert commands in
>>>> ifcfg-ethX files) when a nic is up, immediatly after network script
>>>> runs?? Like for example it can do with debian/ubuntu: post-up
>>>> post-down.
>>>
>>> /sbin/ifup-pre-local and /sbin/ifdown-pre-local are executed (if exist)
>>> before bringing interface up&   down
>>>
>>> /sbin/ifup-local and /sbin/ifup-local are executed (if exist) after
>>> bringing interface up&   down and setting up routes.
>>>
>>> Argument to each will be interface name. Note that if you have aliases,
>>> this script will be called for each alias.
>>
>> OK, I have such a file that I still have to manually run when the system
>> reboots. I get no error messages nor is the file run.
>>
>> # ls --lcontext /sbin/ifup-local
>> -rwxr-xr-x. 1 system_u:object_r:bin_t:s0       root root 329 Jul 25
>> 13:30 /sbin/ifup-local
>>
>> Any hints what I may have wrong?
>
> Is your network setup managed by "network" service or NetworkManager? If
> later, I don't think it cares about these local scripts at all..
>
> If you are using "network", try to find out if it runs or not by putting
> something simple inside, like
>
> #!/bin/sh
> echo "$@">  /tmp/ifup-local-test
>
> If you need NetworkManager, I don't think I can give any advice on how
> to make it work when NM manages network..

Hm, turns out I do not have that interface on Network Manager. So something
else is preventing it from working. I don't remember if ifdown;ifup picks
up the file. I think it does but a reboot fails to run the local file. I
really need to recheck that and then check in here again.

It acts as if the file is not even seen since there are no selinux problems
reported for it. So that makes me think something spooky is going on.

{^_^}

ATOM RSS1 RSS2