Re: NM - where are the docs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-05-06 at 14:08 +0100, Timothy Murphy wrote:
> I've no idea what NetworkManagerDispatcher is supposed to do,
> or what, if anything, should be in /etc/NetworkManager/dispatcher.d/ .

The dispatcher runs scripts when the network status changes, they're
passed the name of the interface and its status (e.g. "eth0 down").  I
have a script in there that stops/starts/restarts NTPD when my laptop
finds an interface (see below - the "logger" thing logs messages in
the /var/log/messages file if the program is there, else it just echos
responses somewhere).

I'd like better documentation, too.  The only useful stuff that I found
seemed to be what people had experimented around with.  Likewise for
power management scripts.

-- 
(This computer runs FC7, my others run FC4, FC5 & FC6, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.





---------------- example dispatcher script ---------------

#!/bin/bash

if [ -x /usr/bin/logger ]; then
        LOGGER="/usr/bin/logger -s -p user.notice -t NetworkManagerDispatcher"
else
        LOGGER=echo
fi

if [ ! -x /etc/init.d/ntpd ]; then
  $LOGGER "init script /etc/init.d/ntpd missing or not executible"
  return
fi
  
if [ -n $1 ] && [ $2 == "up" ]; then

  if [ -f /var/run/ntpd.pid ]; then
    $LOGGER "ntpd is running, restart"
    /sbin/service ntpd restart
  else
    $LOGGER "ntpd is not running, start"
    /sbin/service ntpd start
  fi

fi

if [ -n $1 ] && [ $2 == "down" ] && [ -f /var/run/ntpd.pid ]; then
  $LOGGER "ntpd is running, stop"
  /sbin/service ntpd stop
fi


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux