From: Alex de L. <ale...@us...> - 2005-12-21 03:50:52
|
Update of /cvsroot/morphix/scripts-base/etc/init.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25886 Modified Files: knoppix-autoconfig morphix-start Log Message: * number of minor cleanups Index: knoppix-autoconfig =================================================================== RCS file: /cvsroot/morphix/scripts-base/etc/init.d/knoppix-autoconfig,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** knoppix-autoconfig 28 Nov 2005 09:12:35 -0000 1.64 --- knoppix-autoconfig 21 Dec 2005 03:50:42 -0000 1.65 *************** *** 72,75 **** --- 72,81 ---- case "$CMDLINE" in *\ myconf*|*\ floppyconf*|*\ custom*) MYCONF="yes"; ;; esac + #### + # + # Bootoption: myconfig + # + #### + if [ -n "$MYCONF" ]; then # Check for given config directory *************** *** 81,87 **** fi ! ### localization # Allow language specification via commandline. The default language # will be overridden via "lang=de" boot commandline LANGUAGE="$(getbootparam lang 2>/dev/null)" [ -n "$LANGUAGE" ] || LANGUAGE="us" --- 87,100 ---- fi ! #### ! # ! # Localization # Allow language specification via commandline. The default language # will be overridden via "lang=de" boot commandline + # + # Bootoption: lang + # + #### + LANGUAGE="$(getbootparam lang 2>/dev/null)" [ -n "$LANGUAGE" ] || LANGUAGE="us" *************** *** 107,111 **** --- 120,131 ---- fi + #### + # # Set hostname + # + # Bootopion: hostname + # + #### + MHOSTNAME="$(getbootparam hostname)" if [ -n "$MHOSTNAME" ]; then *************** *** 119,122 **** --- 139,150 ---- eend $? + #### + # + # Set username of default user + # + # Bootoption: username + # + #### + USERNAME="$(getbootparam username)" if [ -z $USERNAME ]; then *************** *** 126,130 **** --- 154,165 ---- eend 0 + #### + # # Set clock (Local time is more often used than GMT, so it is default) + # + # Bootoption: utc, gmt + # + #### + UTC="" checkbootparam utc >/dev/null 2>&1 && UTC="-u" *************** *** 142,146 **** --- 177,189 ---- mount -o remount,rw / 2>/dev/null + #### + # + # Set the default timezone + # # NOTE: CHECK IF THIS IS IN MORPHIX BASE! + # + # Bootoption: tz + # + #### KTZ="$(getbootparam tz 2>/dev/null)" *************** *** 158,163 **** modprobe firmware_class >/dev/null 2>&1 ! # Delete obsolete links and files before starting autoconfig if ! checkbootparam "nohwsetup"; then rm -f /dev/cdrom* /dev/cdwriter* /dev/mouse* /dev/modem* /dev/scanner* \ --- 201,211 ---- modprobe firmware_class >/dev/null 2>&1 ! #### ! # # Delete obsolete links and files before starting autoconfig + # + # Bootoption: NOT nohwsetup + # + #### if ! checkbootparam "nohwsetup"; then rm -f /dev/cdrom* /dev/cdwriter* /dev/mouse* /dev/modem* /dev/scanner* \ *************** *** 213,217 **** ifconfig lo 127.0.0.1 up ! # CD Checker if checkbootparam "testcd"; then ebegin "Checking CD data integrity as requested by '${CYAN}testcd${BLUE}' boot option... ${NORMAL}" --- 261,272 ---- ifconfig lo 127.0.0.1 up ! #### ! # ! # CD Checker, tests if all data on /cdrom can be read. ! # Is /cdrom/md5sum created? ! # ! # Bootoption: testcd ! # ! #### if checkbootparam "testcd"; then ebegin "Checking CD data integrity as requested by '${CYAN}testcd${BLUE}' boot option... ${NORMAL}" *************** *** 759,779 **** echo "6" > /proc/sys/kernel/printk - FORCEUSB="$(getbootparam forceusb)" - - if [ -n "$FORCEUSB" ]; then - # dirty hack, might actually work... - rmmod usb-uhci #does this umount usbdevfs? - modprobe usb-ohci - modprobe hid - modprobe keybdev - modprobe mousedev - modprobe usbmouse - echo "FORCING usb-ohci! Adding usbdevfs! (hope this works :o)" - mount -o devmode=0666 -t usbdevfs none /proc/bus/usb >/dev/null 2>&1 - echo "adapting XF86Config-4 for usb-mouse" - sed -e 's/InputDevice *"Serial Mouse"/InputDevice "USB Mouse"/' /etc/X11/XF86Config-4 > /tmp/XF86Config-4-2 - cp /tmp/XF86Config-4-2 /etc/X11/XF86Config-4 - fi - if test -n "$SPLASH"; then echo "show 40000">/proc/splash --- 814,817 ---- Index: morphix-start =================================================================== RCS file: /cvsroot/morphix/scripts-base/etc/init.d/morphix-start,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** morphix-start 29 Nov 2005 01:23:12 -0000 1.131 --- morphix-start 21 Dec 2005 03:50:42 -0000 1.132 *************** *** 22,26 **** # by Olivier Evalet <evaleto at programmers dot ch> ! MORPHIXVERSION="0.5-pre5" SPLASHBIN="/static/splash" --- 22,26 ---- # by Olivier Evalet <evaleto at programmers dot ch> ! MORPHIXVERSION="0.5-pre6" SPLASHBIN="/static/splash" *************** *** 464,468 **** ### # ! # Cheking for persistant /home on local hdd subdirectory # will be merged with the main /home function # --- 464,468 ---- ### # ! # Checking for persistant /home on local hdd subdirectory # will be merged with the main /home function # *************** *** 471,522 **** # ### - OPT="" - LOOPN="" - BINDSWAP="" - BINDHOME="" - HD_DIRECTORY="$(getbootparam fromdirectory)" - MOUNT_IMAGE="localrw" - if test -n "$HD_DIRECTORY";then - /bin/mount -o remount,rw /$MOUNT_IMAGE - LOOPN=`grep -o -e "loop[0-9]*" /proc/mounts |grep -o -e "[0-9]"` - BINDHOME=`ls -1r /$MOUNT_IMAGE/$HD_DIRECTORY/gelux-*.home 2>/dev/null|head -n1` - BINDSWAP=`ls -1r /$MOUNT_IMAGE/$HD_DIRECTORY/gelux-*.swap 2>/dev/null|head -n1` ! OPT="-o rw" #Check for swap! ! if [ -n "$BINDSWAP" ];then #must be avoid ! if ! swapon "$BINDSWAP" 2>/dev/null;then einfo "Formating swap device" mkswap "$BINDSWAP" 2>/dev/null swapon "$BINDSWAP" ! fi ! [ "$?" != "0" ] && einfo "Using swap file : ${YELLOW}$BINDSWAP ${NORMAL}" ! fi fi ! if test -n "$BINDHOME" ; then ! ebegin "Using home file : ${YELLOW}$BINDHOME ${NORMAL}" ! echo -n "${YELLOW}" ! /sbin/e2fsck -yf "$BINDHOME" 2>/dev/null ! echo "${NORMAL}" ! rm /home ! mkdir /home ! if ! /bin/mount -o loop,rw "$BINDHOME" /home 1>/dev/null;then rmdir /home ln -s /ramdisk/home / BINDHOME="" ! eend 1 ! eerror "ERROR on using /home with $BINDHOME" ! else [ -d /home/$USERNAME ] && MYHOMEDIR="$BINDHOME" eend 0 - fi - mkdir /home/root fi # very important stuff!! # modify the /etc/rc0.d/ to avoid the local HDD busy if checkbootparam "bindhome" ;then ! cp /etc/init.d/morphix-umount /mnt/main/etc/rc0.d/K39morphix-umount fi --- 471,531 ---- # ### ! OPT="" ! LOOPN="" ! BINDSWAP="" ! BINDHOME="" ! HD_DIRECTORY="$(getbootparam fromdirectory)" ! MOUNT_IMAGE="localrw" ! if test -n "$HD_DIRECTORY";then ! /bin/mount -o remount,rw /$MOUNT_IMAGE ! LOOPN=`grep -o -e "loop[0-9]*" /proc/mounts |grep -o -e "[0-9]"` ! BINDHOME=`ls -1r /$MOUNT_IMAGE/$HD_DIRECTORY/*.home 2>/dev/null|head -n1` ! BINDSWAP=`ls -1r /$MOUNT_IMAGE/$HD_DIRECTORY/*.swap 2>/dev/null|head -n1` ! ! OPT="-o rw" #Check for swap! ! if [ -n "$BINDSWAP" ];then #must be avoid ! if ! swapon "$BINDSWAP" 2>/dev/null;then einfo "Formating swap device" mkswap "$BINDSWAP" 2>/dev/null swapon "$BINDSWAP" ! fi ! [ "$?" != "0" ] && einfo "Using swap file : ${YELLOW}$BINDSWAP ${NORMAL}" fi ! fi ! ! if test -n "$BINDHOME" ; then ! ebegin "Using home file : ${YELLOW}$BINDHOME ${NORMAL}" ! echo -n "${YELLOW}" ! /sbin/e2fsck -yf "$BINDHOME" 2>/dev/null ! echo "${NORMAL}" ! rm /home ! mkdir /home ! if ! /bin/mount -o loop,rw "$BINDHOME" /home 1>/dev/null;then rmdir /home ln -s /ramdisk/home / BINDHOME="" ! eend 1 ! eerror "ERROR on using /home with $BINDHOME" ! else [ -d /home/$USERNAME ] && MYHOMEDIR="$BINDHOME" eend 0 fi + mkdir /home/root + fi + #### + # # very important stuff!! # modify the /etc/rc0.d/ to avoid the local HDD busy + # + # Shouldn't this be $BINDHOME, not the bindhome boot option? Olivier? + # + #### + if checkbootparam "bindhome" ;then ! cp /etc/init.d/morphix-umount /mnt/main/etc/rc0.d/K39morphix-umount fi *************** *** 749,752 **** --- 758,771 ---- fi + #### + # + # Only create a new home directory and set up the user + # if no home directory exists. If it does exist, only + # create the user + # + # Bootoption: home=create OR NOT home= + # + ### + HOMEDIR="$(getbootparam home)" if test -z "$MYHOMEDIR" -o "$HOMEDIR" = "create" ;then *************** *** 974,978 **** echo 'PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin' >> /home/root/.profile ! # ruthlessly copied from the myhomedir section MYMAINDIR="$(getbootparam main)" --- 993,1004 ---- echo 'PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin' >> /home/root/.profile ! #### ! # ! # If main=* is set, search the specified partition for main-module(s) ! # If you find them, use them instead of the supplied main-module(s) ! # ! # Bootoption: main=* ! # ! #### MYMAINDIR="$(getbootparam main)" *************** *** 1003,1006 **** --- 1029,1042 ---- fi + #### + # + # If we aren't booting from USB and nousb has not been set, try to mount the + # first sda-partition to check if any mainmodules are located on it. + # If they are, load them instead of the mainmodules on the CD. + # + # Bootoptions: nousb, usbboot + # + #### + USBSTORAGE="$(getbootparam nousb)" USBBOOTING="$(getbootparam usbboot)" |