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]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux