Other Stuff

UoM::RCS::Talby


Page Contents:


Page Group:

2010:

2009: 2008:


Related Pages:





USB Stick Automounting on RHEL

USB sticks are not automounted on my nice Scientific Linux (RHEL) 5.x desktops. Why not?

gnome-volume-manager should do the mounting — but it's not running; gnome-volume-manager requires hald to be running, but it's not; in turn this requires the message bus, dbus.

  1. /etc/rc5.d/S22messagebus has failed — even though there exists /var/run/messagebus.pid with the appropriate time-stamp.
  2. /etc/init.d/messagebus start fails as /var/run/messagebus.pid exists, but /etc/init.d/messagebus restart works.
  3. Then /etc/init.d/haldaemon start works and gnome-volume-manager will start too — normally it starts as part of a gnome-session.
  4. Life is too short to figure out why the message bus won't start, though Googling suggests that some RedHat-based systems have problems with the message bus when LDAP authentication is enabled (owing to the order in which services are started being duff).
  5. Simply add a workaround — in addition to /etc/rc5.d/S33messagebus we add
        /etc/rc5.d/:
    
          S97messagebussimonh -> ../init.d/messagebussimonh
    where messagebussimonh is a modified version of the original, in which start now does a stop first:
     
        start() {
    
            #### BEGIN ADDED :
            #
            echo -n $"Stopping system message bus: "
    
            killproc $servicename -TERM
            RETVAL=$?
            echo
            if [ $RETVAL -eq 0 ]; then
                rm -f /var/lock/subsys/$servicename
                rm -f /var/run/messagebus.pid
            fi
            #
            #### END ADDED.
    
    
            echo -n $"Starting system message bus: "
    
            if [ -x /bin/dbus-uuidgen ] ; then
                /bin/dbus-uuidgen --ensure
            fi
    
            daemon --check $servicename $processname --system
            RETVAL=$?
            echo
            [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
        }
    
        stop() {
            echo -n $"Stopping system message bus: "
    
            ## we don't want to kill all the per-user $processname, we want
            ## to use the pid file *only*; because we use the fake nonexistent 
            ## program name "$servicename" that should be safe-ish
            killproc $servicename -TERM
            RETVAL=$?
            echo
            if [ $RETVAL -eq 0 ]; then
                rm -f /var/lock/subsys/$servicename
                rm -f /var/run/messagebus.pid
            fi
        }