Booyo LiveCD/Sys Vinit
BooyoLiveCD/SysVinit ¶As we have seen, the init program is run by the kernel at boot time. It is in charge of starting all the normal processes that need to start up with the system. These include the getty processes that allow you to log in, NFS daemons, FTP daemons, and anything else you want to run when your machine boots.
knoppix ¶bin -> /KNOPPIX/bin boot -> /KNOPPIX/boot lib -> /KNOPPIX/lib opt -> /KNOPPIX/opt sbin -> /KNOPPIX/sbin usr -> /KNOPPIX/usr root@ttyp1[/]# cd /sbin root@ttyp1[sbin]# ls -l init -rwxr-xr-x 1 root root 50932 2004-11-11 08:31 init root@ttyp1[sbin]# ls -l halt lrwxrwxrwx 1 root root 4 2005-01-22 13:42 halt -> init root@ttyp1[sbin]# ls -l reboot lrwxrwxrwx 1 root root 4 2005-01-22 13:42 reboot -> init /etc/inittab si::sysinit:/etc/init.d/rcS l0:0:wait:/etc/init.d/knoppix-halt l6:6:wait:/etc/init.d/knoppix-reboot ca::ctrlaltdel:/etc/init 0 kb::kbrequest:/bin/echo "Keyboard Request -- edit /etc/inittab to let this work." pf::powerwait:/etc/init.d/powerfail start pn::powerfailnow:/etc/init.d/powerfail now po::powerokwait:/etc/init.d/powerfail stop /etc/init.d knoppix-autoconfig -> /KNOPPIX/etc/init.d/knoppix-autoconfig knoppix-halt -> /KNOPPIX/etc/init.d/knoppix-halt knoppix-reboot -> /KNOPPIX/etc/init.d/knoppix-reboot case "$CMDLINE" in *noprompt*) NOPROMPT="yes"; ;; esac FINALCMD="/sbin/$command" if [ -z "$INSTALLED" -a -z "$NOPROMPT" ]; then [ -x /etc/init ] || cp -p /sbin/init /etc/ [ -x /etc/init ] && FINALCMD="/etc/init" /KNOPPIX/etc/init.d knoppix-halt -> knoppix-reboot
Â÷ÀÌÁ¡ ¶34,38c36,37 < init: init.o init_utmp.o < halt: halt.o ifdown.o hddown.o utmp.o reboot.h --- > init: init.o init_utmp.o halt.o ifdown.o utmp.o reboot.h 102,103c92,94 < cd $(ROOT)/sbin; ln -sf halt reboot; < cd $(ROOT)/sbin; ln -sf halt poweroff; --- > cd $(ROOT)/sbin; ln -sf init halt; > cd $(ROOT)/sbin; ln -sf init reboot; > cd $(ROOT)/sbin; ln -sf init poweroff; diff -r sysvinit-2.85/src/halt.c /home/tcheun/sysvinit-knoppix-2.84/src/halt.c 11c11 < * Usage: halt [-n] [-w] [-d] [-f] [-p] --- > * Usage: halt [-n] [-w] [-d] [-f] [-p] [-r] 16a17 > * -r: reboot (act like "reboot") > /* KNOPPIX: the "halt" options idfnpwt halt.c if (!strcmp(progname, "reboot")) do_reboot = 1; if (!strcmp(progname, "poweroff")) do_poweroff = 1; ¿É¼Ç case 'n': do_sync = 0; do_wtmp = 0; case 'w': do_nothing = 1; case 'd': do_wtmp = 0; case 'f': do_hard = 1; case 'i': do_ifdown = 1; case 'p': do_poweroff = 1; case 'r': do_reboot = 1; case 't': tm = optarg; fc3 Ãß°¡ case 'h': do_hddown = 1;
inittab in fedora ¶
gnome -> ¸í·É -> ·Î±×¾Æ¿ô ¶/proc/sys/dev/cdrom/autoclose
/proc/sys/dev/cdrom/autoeject
/proc/sys/dev/cdrom/check_media
/proc/sys/dev/cdrom/debug
/proc/sys/dev/cdrom/info
/proc/sys/dev/cdrom/lock
As an example, the auto eject feature can be turned on by the superuser with the command echo "1" > /proc/sys/dev/cdrom/autoeject. This will cause cdroms to be ejected from the drive when unmounted.
modify sysvinit ¶boot booyo
need libsepol-devel-1.1.1-2.i386.rpm
make BUILD
mv src to fedora for CVS (sshd)
boot fedora
change source code (Makefile, halt.c, init.c)
boot booyo
mv source code
make
ÇØ¾ß ÇÒ ÀÏ
halt.c commit ÇÒ °Í
/sbin/init.org halt.org reboot.org
1019 mv init init.org
1020 cp -p /usr/src/booyo/BUILD/sysvinit-2.85/src/init .
1023 mv halt halt.org
1025 ln -sf init halt
1028 mv reboot reboot.org
1029 ls -l reboot.org
1030 ln -sf init reboot
1033 mv poweroff poweroff.org
1034 ln -sf init poweroff
booyo-halt ¼öÁ¤ ÇÊ¿ä
/initrd/etc/rc.d/inittab, /initrd/init ¼öÁ¤Çß½¿.
|
Beauty and harmony are as necessary to you as the very breath of life. |