Bug 600489

Summary: RFE: Support per-interface custom scripts pre/post ifup/ifdown
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: iarlyy, initscripts-maint-list, jonathan, lnykryn, luvilla, notting, pasik, plautrba, rvokal, rz, viktor, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 592928 Environment:
Last Closed: 2013-03-26 11:59:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bill Nottingham 2010-06-04 19:50:41 UTC
Description of problem:

I'd like to run custom pre/post scripts for ifup and ifdown, to make
advanced network configuration with iproute and other tools.

Currently there is no way to execute custom scripts on ifup/ifdown for an ethernet interface. Default networking scripts look for /sbin/ifup-local, and execute it if it exists, but it would be much more convenient to have something under /etc/ instead, and be able to have a script per interface useable out-of-the-box without any manual hacks under /sbin/.

Version-Release number of selected component (if applicable):
rhel5

Currently in rhel5 you can do this:

1. create /etc/sysconfig/network-scripts/ifcfg-zscripts with contents
DEVICE=dummy0
ONBOOT=yes

2. create /sbin/ifup-local executable with for example:
#!/bin/bash
if [ "$1" == "dummy0" ]; then
  echo "running scripts"
 ip...
 arp...

fi

It will be executed for every interface, others that dummy0 are skipped.
But this is not very nice method..

Debian/Ubuntu allows the user to specify custom commands directly from /etc/network/interfaces file, configured per interface.

Comment 1 Pasi Karkkainen 2013-02-25 18:54:11 UTC
Any plans for this?

Comment 2 Lukáš Nykrýn 2013-02-26 08:36:07 UTC
I don't think that this is useful anymore, because in default state network initscript is not running.

Comment 3 Václav Pavlín 2013-03-26 11:59:03 UTC
I agree with Lukáš - closing as wontfix