Changeset 7c3008e for fedkit/federate.sh


Ignore:
Timestamp:
May 22, 2008 7:09:10 AM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
2aeb39e
Parents:
f778038
Message:

checkpoint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/federate.sh

    rf778038 r7c3008e  
    166166/usr/local/etc/emulab/rc/rc.route boot
    167167
     168# And restore the ifconfig information because SEER wants it. (SEER pulls this
     169# from tmcc now
     170# "$EMUDIR/tmcc" ifconfig > /var/emulab/boot/tmcc/ifconfig
     171
     172# SEER feels pain and confusion if times are wrong.  This lays a big lick on
     173# ntp sets the time directly and then restarts it.  XXX FreeBSD incantation is
     174# untested.
     175
     176case `uname` in
     177        "FreeBSD")
     178                /etc/rc.d/ntpd stop
     179                /usr/sbin/ntpdate boss
     180                /etc/rc.d/ntpd start
     181                ;;
     182        "Linux")
     183                /etc/rc.d/init.d/ntpd stop
     184                /usr/sbin/ntpdate boss
     185                /etc/rc.d/init.d/ntpd start
     186                ;;
     187esac
     188
    168189# Execute any command passed in as a startcmd.  This basically daisy chains the
    169 # startcmd.
     190# startcmd.  This needs to become a perl script to have uniform behavior here.
     191echo "*$1* *$2*"
    170192if [ ! -z "$1" ]; then
    171         su -l "$1" -c "$2"
    172 fi
     193        echo "calling *$1* *$2*"
     194        case `uname` in
     195                "FreeBSD")
     196                        su -l "$1" -c "$2"
     197                        ;;
     198                "Linux")
     199                        su "$1" --command="$2"
     200                        ;;
     201        esac
     202fi
Note: See TracChangeset for help on using the changeset viewer.