--- trunk/mkinitrd-magellan/livecd/linuxrc.sh 2008/01/14 19:32:52 663 +++ trunk/mkinitrd-magellan/livecd/linuxrc.sh 2008/06/26 22:48:31 754 @@ -1,5 +1,5 @@ #!/bin/sh -# $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.3 2008-01-14 19:32:52 niro Exp $ +# $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.8 2008-06-26 22:48:31 niro Exp $ # loads given kernel modules load_kernel_modules() @@ -57,7 +57,7 @@ DOUSB=no DOSATA=no DOFB=no -NOPATA=no +DOPATA=no FORCED_ROOTFS="" ## starts here ## @@ -85,23 +85,22 @@ dofb) DOFB=yes ;; - nopata) - NOPATA=yes + dopata) + DOPATA=yes ;; rootfs=*) - shift - FORCED_ROOTFS="${1#*=}" + FORCED_ROOTFS="${i#*=}" ;; esac done # now load all needed modules +[ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer" load_kernel_modules "generic" -[ "${NOPATA}" != "yes" ] && load_kernel_modules "pata" +[ "${DOPATA}" = "yes" ] && load_kernel_modules "pata" [ "${DOSCSI}" = "yes" ] && load_kernel_modules "scsi" [ "${DOUSB}" = "yes" ] && load_kernel_modules "usb" [ "${DOSATA}" = "yes" ] && load_kernel_modules "sata" -[ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer" # create newroot mount point mkdir -p /sysroot @@ -128,21 +127,21 @@ # searching usbstick if [ "${DOUSB}" = "yes" ]; then ROOTFS="vfat" - [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" + [[ ! -z ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" check_drives "/dev/sd*" "${ROOTFS}" check_drives "/dev/sg*" "${ROOTFS}" fi # for cdrom_device in $CDROM_LIST (ide) ROOTFS="iso9660" -[[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" +[[ ! -z ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" check_drives "/dev/cdroms/*" "${ROOTFS}" check_drives "/dev/hd*" "${ROOTFS}" # scsi cdroms if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then ROOTFS="iso9660" - [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" + [[ ! -z ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" check_drives "/dev/sr*" "${ROOTFS}" check_drives "/dev/sg*" "${ROOTFS}" check_drives "/dev/scd*" "${ROOTFS}" @@ -180,6 +179,10 @@ # make /sysroot/dev/console & /mnt/dev/null [ ! -e /sysroot/dev/console ] && mknod -m 600 /sysroot/dev/console c 5 1 [ ! -e /sysroot/dev/null ] && mknod -m 666 /sysroot/dev/null c 1 3 + # only to be safe and to have a log channel + [ ! -e /sysroot/dev/tty ] && mknod ${BINDIR}/dev/tty c 5 0 + # busybox needs this one + [ ! -e /sysroot/dev/tty5 ] && mknod ${BINDIR}/dev/tty5 c 4 5 (cd /sysroot/mnt/cloop; cp -a etc root home var /sysroot)