The (RedHat/Fedora) Network Profile Manager
Download:  1.6    1.5    1.4    1.3   
Current Version: 1.6
Purpose: The purpose of netprofmgr is to simplify network profile management of Linux systems that store their network interface definitions in /etc/sysconfig/network-scripts/ifcfg-<interface>. The key assumption that this script makes to simplify profile management is that you don't need to use more than one network interface at a time. For most users, this is generally true. So for those users, this script seeks to make switching from one network profile to another very easy. Each netprofmgr profile is stored in its own sub-directory under /etc/netprofmgr/profiles.
Maintainer: Brad Diggs
Contributors: You
Usage:
netprofmgr <profile>
  or
Usage: negmgr-gui
   This is the graphical netprofmgr profile selector.
  or
netprofmgr -a <action> -p <profile>
     -a <action>     # Action to be performed where valid actions include the following:
           use       # Switch the network configuration to use a new profile
           add       # Add a new network profile
           del       # Delete a network profile
           list      # List available profiles
           install   # Setup the /etc/netprofmgr profiles directory and add some default profiles

     -p <profile>    # Profile name
     -h              # Display usage
     -l              # Display license

   # The following optional parameters are used only for adding a new profile

     -I <interface>
     -i <IP Address>
     -n <Netmask>
     -g <Default Gateway>
     -N <Primary Nameserver>
     -D <Domain Name>
     -e <ESSID>
     -K <ASCII WEP Key>
     -H <Hex WEP Key>
Examples:

Example #1: The following command illustrates the usage and sample output for installing netprofmgr. Note that it creates a dhcp profile for each network interface listed by "ifconfig -a":
# netprofmgr -a install
Adding a network profile called off to disable all networking.
Adding enabled dhcp interface eth0 to profile dhcp-eth0
Adding disabled interface wlan0 to profile dhcp-eth0
Adding disabled interface eth0 to profile dhcp-wlan0
Adding enabled dhcp interface wlan0 to profile dhcp-wlan0

Example #2: The following command illustrates the usage and sample output for showing the active profile and listing available profiles:
# netprofmgr
The current profile is: home-wireless
 
Here are the available profiles:
dhcp
dhcp-eth0
dhcp-wlan0
home
home-wireless
off Use -h flag to see proper usage

Example #3: The following command adds a network profile called 'atwork' where the only active inteface is eth0 with an IP address of 192.168.0.10, a netmask of 255.255.255.0, a default gateway 192.168.0.1, and a primary DNS server of 192.168.0.1:
# netprofmgr -a add -I eth0 -i 192.168.0.10 -n 255.255.255.0 -g 192.168.0.1 -N 192.168.0.1 -p atwork

Example #4: The following command activates the 'atwork' profile:
# netprofmgr atwork

Example #5: The following command deletes the 'atwork' profile:
# netprofmgr -a del -p atwork

Example #6: Run the netprofmgr-gui command to start up the netprofmgr graphical profile selector.

netprofmgr-gui

Example #7: To run netprofmgr-gui from kde or gnome launcher, add a launcher icon and use the following commmand:
/usr/bin/kdesu -u root /usr/local/bin/netprofmgr-gui

Changelog:

Changes in 1.6

  • Added support for ntp.conf
  • Added support for ascii key
  • Updated usage to reflect new capabilities
  • Fixed bug with 'add' overwriting existing profile
  • Added GPLv2 license

Changes in 1.5

  • Added ability to set and view the current profile

Changes in 1.4

  • Added a gui interface via zenity.

Changes in 1.6

  • None at this time.
Desired New Features: Send your changes to me via e-mail (brad at this domain).

Desired features for v1.7

  • A fully functional gui wrapper for the cli that enables activating a profile, adding a profile, deleting a profile, and changing a profile.
Other Tools:
Solaris Zone Manager zonemgr

View Brad Diggs's profile on LinkedIn