+Popular
last.fm playlist
- Piñon Fijo - 11. Rio Rio, 04. Sep. 2010 @ 17:54
- Batucada - 4.cumpleaños feliz (batucada), 04. Sep. 2010 @ 17:54
- Randy Newman - No navegaré nunca más, 04. Sep. 2010 @ 17:49
- disney - Cumpleaños Feliz, 04. Sep. 2010 @ 17:45
- Tina Turner - Great Spirits, 04. Sep. 2010 @ 17:41
- Xuxa - IIarie, 04. Sep. 2010 @ 17:36
- Mulan - 03 - Hombres De Acción Serán Hoy, 04. Sep. 2010 @ 17:33
- Christell - Mi Mama Me Mima, 04. Sep. 2010 @ 17:30
- Barney - Barney & Friends - The Wheels On The Bus, 04. Sep. 2010 @ 17:29
- Randy Newman - Cambios Extraños, 04. Sep. 2010 @ 17:25
| Arranque De Un Sistema Tipo Unix |
|
|
| escrito por Guillermo Garcia Ledezma | |||||
| Saturday, 06 de October de 2007 | |||||
|
La intención de este post es "aclarar" o por lo menos informar como es que funciona el arranque en un sistema tipo Unix (BSD, Linux,etc) cualquier duda ya saben como encontrarme. Leyendo en cofradía vi que hay un artículo interesante sobre el arranque del kernel de linux en inglés Init depende si nuestro sistema es:
Aunque estuve buscando en google no encontré Un proyecto sobre los boot-scripts(ingles) viero pero didáctico. Personalmente prefiero los BSD-Style no necesitas saber tanto de programación en bash y son muy fáciles de entender y modificar comparados con los System V es mi humilde opinión. Ejemplo del Apache en BSD-Style (Slackware) aquí: Ejemplo del Apache en System V (Debian): #!/bin/bash # # apache Start the apache HTTP server. # # The variables below are NOT to be changed. They are there to make the # script more readable. NAME=apache DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid CONF=/etc/$NAME/httpd.conf APACHECTL=/usr/sbin/${NAME}ctl # note: SSD is required only at startup of the daemon. SSD=`which start-stop-daemon` ENV="env -i LANG=C PATH=/bin:/usr/bin:/usr/local/bin" trap "" 1 # Check that we're not being started by inetd if egrep -q -i "^[[:space:]]*ServerType[[:space:]]+inet" $CONF then exit 0 fi test_config() { if [ ! -x $APACHECTL ]; then echo "$APACHECTL is not executable, exiting" exit 0 fi # ensure we don't leak environment vars into apachectl APACHECTL="$ENV $APACHECTL" if ! $APACHECTL configtest 2> /dev/null then printf "Configuration syntax error detected. Not reloading.\n\n" $APACHECTL configtest exit 1 fi } should_start() { if [ ! -x $DAEMON ]; then echo "apache is not executable, not starting" exit 0 fi } case "$1" in start) should_start test_config echo -n "Starting web server: $NAME" $ENV $SSD --start --pidfile $PIDFILE --exec $DAEMON > /dev/null ;; stop) echo -n "Stopping web server: $NAME" start-stop-daemon --stop --pidfile $PIDFILE --oknodo rm -rf /var/lib/apache/mod-bandwidth/link/* ;; reload | force-reload) test_config echo -n "Reloading $NAME configuration" start-stop-daemon --stop --pidfile $PIDFILE --signal USR1 ;; reload-modules) test_config echo -n "Reloading $NAME modules" start-stop-daemon --stop --pidfile $PIDFILE --oknodo --retry 30 should_start $ENV $SSD --start --pidfile $PIDFILE --exec $DAEMON > /dev/null ;; restart) test_config echo -n "Restarting $NAME" if ! start-stop-daemon -q --stop --pidfile $PIDFILE --signal HUP; then $ENV $SSD --start --pidfile $PIDFILE --exec $DAEMON > /dev/null fi ;;
esac if [ $? -eq 0 ]; then echo . exit 0 else echo " failed" exit 1 fi
Powered by JoomlaCommentCopyright (C) 2006 Frantisek Hliva. All rights reserved.Homepage: http://cavo.co.nr/ |
|||||
| < Anterior | Siguiente > |
|---|






