I was just wondering if it was possible to run a script as soon as a test to see if a network interface is up (like a ping or something)?  I think it would be pretty awesome to update my yum when I login, but I want to make sure that I have internet access first.  Any ideas?
Running a Script as Soon as a Network Interface is Detected as Active
fedora;yum
Why not, instead of whenever you log in, just set up a cron job to do it every morning (say 3am when it wouldn't effect anyone (assuming your machine is up 24/7))?If you really wanted to do it every time you logged in you could just put yumupdate.sh in your .bash_loginAlternatively in your crontab:00 03 * * * yumupdate.shAnd in yumupdate.sh#!/bin/bash            while sleep 300; do     # sleep 5 minutes in between each ping test    nc -vz 8.8.8.8 53   # nc to test connectivity (8.8.8.8 is google dns)    if [ $? -eq 0 ]     # if the previous exit code == 0 (no error)        then            # update yum then update the os then break out of the loop            /usr/bin/yum -y update yum >> ~/yumupdateyum.log             /usr/bin/yum -y update >> ~/yumupdate.log            exit    fidone