From: <ale...@us...> - 2006-03-20 15:47:09
|
Revision: 2144 Author: alextreme Date: 2006-03-20 07:46:58 -0800 (Mon, 20 Mar 2006) ViewCVS: http://svn.sourceforge.net/morphix/?rev=2144&view=rev Log Message: ----------- * cleaning up Removed Paths: ------------- trunk/scripts-base/grub-nonemu/ trunk/scripts-base/grub-nonemu-2.6/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2006-09-20 23:13:23
|
Revision: 2419 http://svn.sourceforge.net/morphix/?rev=2419&view=rev Author: alextreme Date: 2006-09-20 16:12:59 -0700 (Wed, 20 Sep 2006) Log Message: ----------- * removing copyup, bumping Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/morphix-start Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2006-09-14 22:30:57 UTC (rev 2418) +++ trunk/scripts-base/debian/changelog 2006-09-20 23:12:59 UTC (rev 2419) @@ -1,3 +1,9 @@ +morphix-base-scripts (0.5-60) unstable; urgency=low + + * removing copyup= from unionfs-lines + + -- root <ro...@al...> Thu, 21 Sep 2006 01:08:08 +0200 + morphix-base-scripts (0.5-59) unstable; urgency=low * loading minimodules respects boot_option if this file exists in minimodule Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2006-09-14 22:30:57 UTC (rev 2418) +++ trunk/scripts-base/etc/init.d/morphix-start 2006-09-20 23:12:59 UTC (rev 2419) @@ -21,7 +21,7 @@ # Changes for home-image creation # by Olivier Evalet <evaleto at programmers dot ch> -MORPHIXVERSION="0.5-pre6" +MORPHIXVERSION="0.5-pre7" SPLASHBIN="/static/splash" . /etc/morphix.d/color.sh @@ -352,15 +352,15 @@ mkdir -p $DIR2/modules >/dev/null 2>&1 if [ -x /sbin/unionctl -o -x /usr/bin/unionctl ];then - mount -t unionfs -o dirs=/mnt/main${UNIONFS_MOUNT_OPT},copyup=preserve,debug=$DEBUGOVERLAY none /mnt/main + mount -t unionfs -o dirs=/mnt/main${UNIONFS_MOUNT_OPT},debug=$DEBUGOVERLAY none /mnt/main unionctl /mnt/main --add --mode ro /mnt/main_ro unionctl /mnt/main --add --mode rw $DIR2/root else - mount -t unionfs -o dirs=$DIR2/root=rw:/mnt/main_ro=ro${UNIONFS_MOUNT_OPT},copyup=currentuser,debug=$DEBUGOVERLAY none /mnt/main + mount -t unionfs -o dirs=$DIR2/root=rw:/mnt/main_ro=ro${UNIONFS_MOUNT_OPT},debug=$DEBUGOVERLAY none /mnt/main fi eend $? - mount -t unionfs -o dirs=$DIR2/modules=rw:/MorphixCD/lib/modules=ro,copyup=currentuser,debug=$DEBUGOVERLAY none /mnt/main/lib/modules + mount -t unionfs -o dirs=$DIR2/modules=rw:/MorphixCD/lib/modules=ro,debug=$DEBUGOVERLAY none /mnt/main/lib/modules elif [ -n "$COWLOOP" ]; then ebegin "Overlaying using cowloop" @@ -386,7 +386,7 @@ else if [ -n "$UNIONFS" ]; then - mount -t unionfs -o dirs=$DIR2/dev=rw:/MorphixCD/dev=ro,copyup=currentuser,debug=$DEBUGOVERLAY none /mnt/main/dev 2>&1 + mount -t unionfs -o dirs=$DIR2/dev=rw:/MorphixCD/dev=ro,debug=$DEBUGOVERLAY none /mnt/main/dev 2>&1 else mount --bind /MorphixCD/dev /mnt/main/dev fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bms...@us...> - 2006-10-24 20:32:39
|
Revision: 2434 http://svn.sourceforge.net/morphix/?rev=2434&view=rev Author: bmsleight Date: 2006-10-24 13:32:25 -0700 (Tue, 24 Oct 2006) Log Message: ----------- Fix 1583995 - Subsequent MiniModule failure when using tags (hopefully) - lots of code, massive diff .... Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/load-minimodules.sh Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2006-10-18 20:12:53 UTC (rev 2433) +++ trunk/scripts-base/debian/changelog 2006-10-24 20:32:25 UTC (rev 2434) @@ -1,3 +1,9 @@ +morphix-base-scripts (0.5-62) unstable; urgency=low + + * Fix 1583995 - Subsequent MiniModule failure when using tags (hopefully) + + -- bmsleight <bms...@ba...> Tue, 24 Oct 2006 21:30:00 +0100 + morphix-base-scripts (0.5-61) unstable; urgency=low * usb homedir fix (hopefully) Modified: trunk/scripts-base/etc/init.d/load-minimodules.sh =================================================================== --- trunk/scripts-base/etc/init.d/load-minimodules.sh 2006-10-18 20:12:53 UTC (rev 2433) +++ trunk/scripts-base/etc/init.d/load-minimodules.sh 2006-10-24 20:32:25 UTC (rev 2434) @@ -69,7 +69,7 @@ einfo " Main: $MainTag${NORMAL}" chroot /mnt/main umount /mnt/mini/mod$count chroot /mnt/main rm /dev/cloop$count - chroot /mnt/main rm /mnt/mini/mod$count + chroot /mnt/main rmdir /mnt/mini/mod$count return 1 fi fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-03-28 22:59:37
|
Revision: 2620 http://morphix.svn.sourceforge.net/morphix/?rev=2620&view=rev Author: alextreme Date: 2008-03-27 09:46:19 -0700 (Thu, 27 Mar 2008) Log Message: ----------- * cleaning up large parts of the base module's init scripts, rewriting parts for usage of udev. * base modules using these scripts will require python, add python-minimal to your isomaker template! * This is a work-in-progress. If you depend on a working base iso, save your last build and don't expect those of the next few days to work. Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/knoppix-autoconfig trunk/scripts-base/etc/init.d/load-minimodules.sh trunk/scripts-base/etc/init.d/morphix-start trunk/scripts-base/miniroot/debian/changelog trunk/scripts-base/miniroot/linuxrc-scripts/linuxrc trunk/scripts-base/usr/sbin/rebuildfstab trunk/scripts-base/usr/sbin/scanpartitions Added Paths: ----------- trunk/scripts-base/usr/sbin/linux_devices.py trunk/scripts-base/usr/sbin/rebuildfstab-morphix Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/debian/changelog 2008-03-27 16:46:19 UTC (rev 2620) @@ -1,3 +1,15 @@ +morphix-base-scripts (0.5-65) unstable; urgency=low + + * Large cleanup of pre-udev stuff, restructuring loading of main/minimods + + -- Alex de Landgraaf <al...@de...> Thu, 27 Mar 2008 17:40:25 +0100 + +morphix-base-scripts (0.5-64) unstable; urgency=low + + * Fixing unionfs-mount commands + + -- alextreme <al...@de...> Wed, 05 Dec 2007 14:30:29 +0100 + morphix-base-scripts (0.5-63) unstable; urgency=low * Fix 1589476 XOrg patch for Modules, and locations. Modified: trunk/scripts-base/etc/init.d/knoppix-autoconfig =================================================================== --- trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-03-27 16:46:19 UTC (rev 2620) @@ -14,8 +14,7 @@ # Ignore these signals: INT, TERM, SEGV trap "" 2 3 11 -## FIXME this is really strange (kernel-2.6.13). At this point proc is not available, but when exit the linuxrc proc is still savailable?? -## There is also a strange message : Failed to mount /selinux/ + [ -f /proc/version ] || mount -t proc proc /proc 2>/dev/null @@ -52,10 +51,8 @@ [ -d /sys/devices ] || mount -t sysfs /sys /sys 2>/dev/null eend $? -#mount udev after sysfs if [ -x /etc/init.d/udev ];then - #You can add more loop device 1->N in /etc/udev/links.sh - ebegin "Configuring system to udev" + ebegin "Configuring system to use udev" /etc/init.d/udev start &>/dev/null eend $? fi @@ -459,7 +456,7 @@ [ -n "$NOSCSI" ] && HWSETUP_NOSCSI="-s" if checkbootparam "nohwsetup"; then einfo "Loading hardware profile from ${MAGENTA}/etc/modules${BLUE}.${NORMAL}" - /etc/init.d/module-init-tools start >/dev/null 2>/dev/null #replace modutils by his 2.6 version + /etc/init.d/module-init-tools start >/dev/null 2>/dev/null else ebegin "Autoconfiguring devices (hardware setup)" if [ -z "$DEBUG" ]; then @@ -499,8 +496,6 @@ if [ -x /etc/init.d/alsa-autoconfig ]; then DRIVERS="$SOUND_DRIVER" /etc/init.d/alsa-autoconfig -#elif [ -x /usr/sbin/morphix-alsasound ]; then -# DRIVERS="$SOUND_DRIVER" /usr/sbin/morphix-alsasound fi # This should be in morphix-alsasound script @@ -520,45 +515,6 @@ done fi -# Check for blind option or brltty -# -# NOTE: This won't work in Morphix -# -BLIND="" -checkbootparam "blind" && BLIND="yes" -BRLTTY="$(getbootparam brltty 2>/dev/null)" - -if [ -n "$BLIND" -o -n "$BRLTTY" ]; then - if [ -x /sbin/brltty ]; then -# Blind option detected, start brltty now. - CMD=brltty - BRLTYPE="" - BRLDEV="" - BRLTEXT="" - if [ -n "$BRLTTY" ]; then -# Extra options - BRLTYPE="${BRLTTY%%,*}" - R="${BRLTTY#*,}" - if [ -n "$R" -a "$R" != "$BRLTTY" ]; then - BRLTTY="$R" - BRLDEV="${BRLTTY%%,*}" - R="${BRLTTY#*,}" - if [ -n "$R" -a "$R" != "$BRLTTY" ]; then - BRLTTY="$R" - BRLTEXT="${BRLTTY%%,*}" - R="${BRLTTY#*,}" - fi - fi - fi - [ -n "$BRLTYPE" ] && CMD="$CMD -b $BRLTYPE" - [ -n "$BRLDEV" ] && CMD="$CMD -d $BRLDEV" - [ -n "$BRLTEXT" ] && CMD="$CMD -t $BRLTEXT" - echo " ${BLUE}Starting braille-display manager: ${GREEN}${CMD}${BLUE}.${NORMAL}" - ( exec $CMD & ) - sleep 2 - fi -fi - if test -n "$SPLASH"; then echo "show 20000">/proc/splash 2>/dev/null fi @@ -607,7 +563,6 @@ # Read in changes [ -f /etc/sysconfig/morphix ] && . /etc/sysconfig/morphix -#[ -f /etc/sysconfig/knoppix ] && . /etc/sysconfig/knoppix if [ -n "$INTERACTIVE" ] then @@ -624,14 +579,6 @@ echo "show 24000">/proc/splash 2>/dev/null fi -# Add new devices to /etc/fstab -# maybe it's better to use CD drive information from /proc/sys/dev/cdrom/info ? -for i in /dev/cdrom*; do - if [ -L $i ]; then - addmount "$i" "ro" - fi -done - NOSWAP="" DMA="" checkbootparam "noswap" && NOSWAP="yes" @@ -673,12 +620,8 @@ # Start creating /etc/fstab with HD partitions and USB SCSI devices now ebegin "Scanning for Harddisk partitions and creating ${YELLOW}/etc/fstab${BLUE}... " -rebuildfstab -r -u $USERNAME >/dev/null 2>&1 +rebuildfstab-morphix $USERNAME >/dev/null 2>&1 val=$? -if [ -e /var/run/rebuildfstab.pid ]; then -# Another instance of rebuildfstab, probably from hotplug, is still running, so just wait. - sleep 8 -fi eend $val if [ -n "$partitions" ]; then @@ -696,27 +639,6 @@ continue ;; esac -# Create mountdir if not already present -# FIXME already done by rebuildfstab -# d="/mnt/${p##*/}" ; [ -d "$d" ] || mkdir -p "$d" - case "$f" in vfat|msdos) - if [ -z "$NOSWAP" ] && mount -o uid=$USERNAME,gid=users,ro -t $f $p $d 2>/dev/null; then - if [ -f $d/morphix.swp ]; then - mount -o remount,rw $d - if swapon $d/morphix.swp 2>/dev/null; then - einfo "${BLUE}Using Morphix swapfile ${MAGENTA}$d/morphix.swp${BLUE}.${NORMAL}" - mount -o remount,ro $d 2>/dev/null - fnew="$d/morphix.swp swap swap defaults 0 0" - stringinfile "$fnew" "/etc/fstab" || echo "$fnew" >> /etc/fstab - else - umount $d - fi - else - umount $d - fi - fi - ;; - esac done </etc/fstab fi @@ -792,6 +714,7 @@ fi [ -n "$FOUND_CONFIG" ] || echo " ${BLUE}Not present.${NORMAL}" fi + if test -n "$SPLASH"; then echo "show 36000">/proc/splash Modified: trunk/scripts-base/etc/init.d/load-minimodules.sh =================================================================== --- trunk/scripts-base/etc/init.d/load-minimodules.sh 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/etc/init.d/load-minimodules.sh 2008-03-27 16:46:19 UTC (rev 2620) @@ -4,43 +4,16 @@ # # Feel free to change this file to adapt it to your main-module # -# copyleft 2003-2005, Alex de Landgraaf <alex at delandgraaf dot com> +# Copyleft 2003-2005, Alex de Landgraaf <alex at delandgraaf dot com> # GPL, (www.gnu.org for details) # # $Id$ -# -# All linking/binding, copying /etc and /var etc is done -# in /etc/init.d/morphix-start on Morphix Base -# Could also be done here, but would be unneeded complexity -# (and modules should be loaded in a uniform matter) -# -# MiniModules are loaded here, still a bit dirty for now, -# as we need a kernelmodule for each minimodule that we want to load -# Reread boot command line; echo last parameter's argument or return false. . /etc/morphix.d/color.sh . /etc/morphix.d/functions.sh CMDLINE="$(cat /proc/cmdline)" -trymount(){ -# Apparently, mount-aes DOES autodetect AES loopback files. - [ -b "$1" ] && { mount -t auto -o ro "$1" "$2" 2>/dev/null; RC="$?"; } -# We need to mount crypto-loop files with initial rw support - [ -f "$1" ] && { mount -t auto -o loop,rw "$1" "$2" 2>/dev/null; RC="$?"; } - [ "$RC" = "0" ] && return 0 - echo "" - einfo "Filesystem not autodetected, trying to mount $1 with AES256 encryption" - a="y" - while [ "$a" != "n" -a "$a" != "N" ]; do -# We need to mount crypto-loop files with initial rw support - mount -t auto -o loop,rw,encryption=AES256 "$1" "$2" && return 0 - echo -n "${RED}Mount failed, retry? [Y/n] ${NORMAL}" - read a - done - return 1 -} - # Mounts a minimod to the directory appointed to the module # first argument is the file seen from the mainmodule/chroot # second argument is the number of the module @@ -60,47 +33,12 @@ mount_module $file /mnt/main/mnt/mini/mod$count $count >/dev/null 2>&1 fi - MainTag=$(head -n 1 /mnt/main/morphix/main_module) - MiniTag=$(head -n 1 /mnt/main/mnt/mini/mod$count/morphix/main_module 2>/dev/null) - if [ -n "$MiniTag" -a -n "$MainTag" ]; then - if [ "$MainTag" != "$MiniTag" ] && [[ $MiniTag != ALL* ]]; then - ewarn "${RED}MiniModule $file doesn't have the same tag as MainModule${NORMAL}" - einfo "${GREEN} Mini: $MiniTag" - einfo " Main: $MainTag${NORMAL}" - chroot /mnt/main umount /mnt/mini/mod$count - chroot /mnt/main rm /dev/cloop$count - chroot /mnt/main rmdir /mnt/mini/mod$count - return 1 - fi - fi - MiniTagBootOption=$(head -n 1 /mnt/main/mnt/mini/mod$count/morphix/boot_option 2>/dev/null) - if [ -n "$MiniTagBootOption" ]; then - BOOTOPTIONOK="" - case "${CMDLINE}" in *\ ${MiniTagBootOption}*) BOOTOPTIONOK="yes"; ;; esac - if [ "${MiniTagBootOption}" != "ALL" ]; then - if [ -z "${BOOTOPTIONOK}" ]; then - einfo "${GREEN} Boot Option ${RED}${MiniTagBootOption}${NORMAL} not found. Skipping MiniModule.${NORMAL}" - einfo "${GREEN} Boot Options found ${RED}${CMDLINE}${NORMAL}" - einfo "${GREEN} Mini: $file ${NORMAL}" - chroot /mnt/main umount /mnt/mini/mod$count - chroot /mnt/main rm /dev/cloop$count - chroot /mnt/main rm /mnt/mini/mod$count - return 1 - fi - fi - fi - - echo "$count" > /mnt/mini/num_loaded - # Unionfs overlaying (only if unionctl exists and the root dir in the minimodule exists + # Unionfs overlaying # Add the /root dir to be the unionfs branch after the first component (which should be 0 and rw...) - if [ -x /usr/sbin/unionctl -o -x /usr/bin/unionctl ];then - if [ -d /mnt/main/mnt/mini/mod$count/root ]; then - unionctl /mnt/main --add --after 0 --mode ro /mnt/main/mnt/mini/mod$count/root - fi - else - einfo "No unionctl found, not applying unionfs minimodule overlaying"; + if [ -d /mnt/main/mnt/mini/mod$count/root ]; then + mount -t unionfs -o remount,add=:/mnt/main/mnt/mini/mod$count/root=ro none /mnt/main fi if [ -e /mnt/main/mnt/mini/mod$count/morphix/loadmod.sh ]; then @@ -121,56 +59,16 @@ MiniModulesCount=0 einfo "Starting MiniModule bootscript" -# copied from myhome, you can specify a device to load minimods from -#using the mini= bootparameter. Modules would be in the root of the directory +# checks for all minimodules on all mounted partitions -MYMINIDIR="$(getbootparam mini)" -if [ -n "$MYINIDIR" ]; then - case "$MYMINIDIR" in - /dev/*) - MYMINIDEVICE="${MYMINIDIR##/dev/}" - MYMINIDEVICE="/dev/${MYMINIDEVICE%%/*}" - MYMINIMOUNTPOINT="/mnt/minimod}" - MYMINIDIR="/mnt/${MYMINIDIR##/dev/}" - ;; - /mnt/*) - MYMINIDEVICE="${MYMINIDIR##/mnt/}" - MYMINIDEVICE="/dev/${MYMINIDEVICE%%/*}" - MYMINIMOUNTPOINT="/mnt/minimod}" - MYMINIDIR="$MYMINIDIR" - ;; - *) - ewarn "Invalid ${CYAN}mini=${NORMAL} option '$MYMINIDIR' specified (must start with /dev/ or /mnt/)." - ewarn "Option ignored." - ;; - esac - if trymount "$MYMINIDEVICE" "$MYMINIMOUNTPOINT"; then - MntMiniModules="$(ls /mnt/minimod/*.mod 2> /dev/null)" - MntMiniModulesCount="$(ls /mnt/minimod/*.mod 2> /dev/null | wc -l)" - for file in $MntMiniModules - do - load_mini_module "$file" $MiniModuleCount - ((MiniModuleCount += 1)) - done - einfo "Device $MYMINIDEVICE will be used for the /mnt/minimod directory..." - fi -fi - -# checks for all minimodules on the usb device, -# unless nousb or usbboot is being used (the latter would mean that the -# minimodules are loaded from /cdrom instead...) - echo -USBSTORAGE="$(getbootparam nousb)" -USBBOOTING="$(getbootparam usbboot)" -if [ -z "$USBSTORAGE" -a -z "$USBBOOTING" ]; then - einfo "Checking for MiniModules on USB device" +NOUSB="$(getbootparam nousb)" +if [ -z "$NOUSB" ]; then + einfo "Checking for MiniModules on connected devices" modprobe usb-storage >/dev/null 2>&1 - mkdir /mnt/main/mnt/usb >/dev/null 2>&1 - chroot /mnt/main mount /dev/sda1 /mnt/usb >/dev/null 2>&1 - UsbMiniModules="$(ls /mnt/usb/minimod/*.mod 2> /dev/null)" - UsbMiniModulesCount="$(ls /mnt/usb/minimod/*.mod 2> /dev/null | wc -l)" - for file in $UsbMiniModules + + MiniModules="$(ls /media/*/minimod/*.mod 2> /dev/null)" + for file in $MiniModules do load_mini_module "$file" $MiniModuleCount ((MiniModuleCount += 1)) @@ -182,7 +80,6 @@ echo einfo "Checking for MiniModules on CDROM" CdromMiniModules="$(ls /cdrom/minimod/*.mod 2> /dev/null )" -CdromMiniModulesCount="$(ls /cdrom/minimod/*.mod 2> /dev/null | wc -l )" for file in $CdromMiniModules do load_mini_module "$file" $MiniModuleCount Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/etc/init.d/morphix-start 2008-03-27 16:46:19 UTC (rev 2620) @@ -162,8 +162,6 @@ DEBS="$(chroot /mnt/main ls -1 $1/deb/*.deb 2>/dev/null | wc -l )" if [ $DEBS -gt 0 ]; then -# done anyways -# chroot /mnt/main touch /var/lib/dpkg/status chroot /mnt/main dpkg -i --force-all $1/deb/*.deb fi @@ -224,16 +222,9 @@ # Work out mount options so we can support minimodule overlays. mount_options () { - # which overlayfs? - TRANS="$(getbootparam translucency)" - UNIONFS="$(getbootparam unionfs)" - if [ -n "$TRANS" ]; then - TRANSLUCENCY="on" - export TRANSLUCENCY - else - UNIONFS="on" - export UNIONFS - fi # End switchboard + # Currently we only support unionfs + UNIONFS="on" + export UNIONFS # This shouldn't be necessary, # as --add overlaying is in load-minimodules.sh @@ -267,31 +258,9 @@ DIR2=/tmp/overlay - - ### - # - # Overlay FS switchboard - # - # Bootoption: Use either unionfs or cowloop - # to force the overlay fs. Default currently is unionfs - # - ### + UNIONFS="on" + export UNIONFS - - UNIONFS="$(getbootparam unionfs)" - COWLOOP="$(getbootparam cowloop)" - if [ -n "$UNIONFS" ]; then - UNIONFS="on" - export UNIONFS - elif [ -n "$COWLOOP" ]; then - COWLOOP="on" - export COWLOOP - mknod /dev/cowloop b 241 0 - else - UNIONFS="on" - export UNIONFS - fi # End switchboard - ### # # Load Module @@ -308,19 +277,12 @@ exit fi - if [ -n "$UNIONFS" ]; then - mkdir /mnt/main_ro >/dev/null 2>&1 - fi + mkdir /mnt/main_ro >/dev/null 2>&1 mkdir /mnt/mainmod >/dev/null 2>&1 mkdir /mnt/minimod >/dev/null 2>&1 mkdir /mnt/mini >/dev/null 2>&1 - if [ -n "$UNIONFS" ]; then - mount_module $1 /mnt/main_ro 1 - else - mount_module $1 /mnt/main 1 - fi - + mount_module $1 /mnt/main_ro 1 eend $? # End Load Module @@ -351,28 +313,15 @@ mkdir -p $DIR2/dev >/dev/null 2>&1 mkdir -p $DIR2/modules >/dev/null 2>&1 - if [ -x /sbin/unionctl -o -x /usr/bin/unionctl ];then - mount -t unionfs -o dirs=/mnt/main${UNIONFS_MOUNT_OPT} none /mnt/main - -# debug is no longer a unionfs-option since unionfs-2.1.x. -# Old mount-line: -# mount -t unionfs -o dirs=/mnt/main${UNIONFS_MOUNT_OPT},debug=$DEBUGOVERLAY none /mnt/main -# - unionctl /mnt/main --add --mode ro /mnt/main_ro - unionctl /mnt/main --add --mode rw $DIR2/root - else - mount -t unionfs -o dirs=$DIR2/root=rw:/mnt/main_ro=ro${UNIONFS_MOUNT_OPT} none /mnt/main + mount -t unionfs -o dirs=$DIR2/root=rw:/mnt/main_ro=ro${UNIONFS_MOUNT_OPT} none /mnt/main fi eend $? mount -t unionfs -o dirs=$DIR2/modules=rw:/MorphixCD/lib/modules=ro none /mnt/main/lib/modules + else + eerror "Unionfs is currently the only supported overlay filesystem." + fi - elif [ -n "$COWLOOP" ]; then - ebegin "Overlaying using cowloop" - mount --bind /MorphixCD/lib/modules /mnt/main/lib/modules - eend $? - fi # End Setup Module - ### # # Birect binds from Base system (mounting RWfs after overlaying ) @@ -392,69 +341,12 @@ else if [ -n "$UNIONFS" ]; then mount -t unionfs -o dirs=$DIR2/dev=rw:/MorphixCD/dev=ro none /mnt/main/dev 2>&1 - else - mount --bind /MorphixCD/dev /mnt/main/dev fi cp /usr/sbin/alsa_snddevices /mnt/main/usr/sbin/alsa_snddevices >/dev/null 2>&1 chroot /mnt/main /usr/sbin/alsa_snddevices >/dev/null 2>&1 fi -if test -n "$SPLASH"; then - if [ -e /proc/splash ]; then - echo "show 52000">/proc/splash 2>/dev/null - fi -fi - -### -# -# home dir section -# Check for persistent homedir option and eventually mount /home from there, -# or use a loopback file. -# -# Bootoption: home=/dev/* | home=/mnt/* | home=scan | home=create -# -### - - HOMEDIR="$(getbootparam home)" - MYHOMEDEVICE="" - MYHOMEMOUNTPOINT="" - MYHOMEDIR="" - if [ -n "$HOMEDIR" ]; then - export HOMEDIR - case "$HOMEDIR" in - /dev/*) - MYHOMEDEVICE="${HOMEDIR##/dev/}" - MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" - MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" - MYHOMEDIR="/mnt/${HOMEDIR##/dev/}" - ;; - /mnt/*) - MYHOMEDEVICE="${HOMEDIR##/mnt/}" - MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" - MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" - MYHOMEDIR="$HOMEDIR" - ;; - [Ss][Cc][Aa][Nn]) -MYHOMEDIR="$(findfile morphix.img)" -MYHOMEDEVICE="${MYHOMEDIR##/mnt/}" -MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" -MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" -;; -[Cc][Rr][Ee][Aa][Tt][Ee]) -MYHOMEDIR="$(createfile morphix.img)" -MYHOMEDEVICE="${MYHOMEDIR##/mnt/}" -MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" -MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" -einfo "Create home file in $MYHOMEDIR" -;; -*) -eerror "Invalid ${CYAN}home=${RED} option '$HOMEDIR' specified (must start with /dev/ or /mnt/ or 'scan').${NORMAL}" -einfo "Option ignored." -;; -esac -fi - # Increment splash's bar, show fifth slide if test -n "$SPLASH"; then @@ -466,94 +358,20 @@ fi fi -### -# -# Checking for persistant /home on local hdd subdirectory -# will be merged with the main /home function -# -# Bootoption: fromdirectory=dirname This bootoption is set -# by the windows installer -# -### - -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 - # always bind home dir, if a home-image is found mount it over the old one mount --bind /home /mnt/main/home - mount --bind /home/root /mnt/main/root -# /home dir's, check permissions... -# - # Mount all harddisk partitions read-only (backgrounded) +# Updated for udev -for i in /mnt/main/mnt/[sh]d[a-z][1-9] /mnt/[sh]d[a-z][1-9]?*; do +for i in /mnt/main/media/[sh]d[a-z][1-9]; do if [ -d "$i" ]; then - chroot /mnt/main mount -r "$i" & + mount -r "$i" & fi done -# /dev files, should be a better way than this -# as we are trying to be able to be independant of Base... - mkdir /mnt/main/MorphixCD 2> /dev/null mount --bind -o ro /MorphixCD /mnt/main/MorphixCD @@ -565,14 +383,6 @@ fi fi -# Copy over the hwsetup-detected symlinks - -cp -a /dev/cdrom* /mnt/main/dev/ 2> /dev/null -cp -a /dev/modem* /mnt/main/dev/ 2> /dev/null -cp -a /dev/mouse* /mnt/main/dev/ 2> /dev/null -cp -a /dev/scanner* /mnt/main/dev/ 2> /dev/null -cp -a /dev/systty /mnt/main/dev/systty 2> /dev/null - mkdir /mnt/main/etc/X11 2> /dev/null mkdir /mnt/main/etc/network 2> /dev/null mkdir /mnt/main/etc/sysconfig 2> /dev/null @@ -581,24 +391,10 @@ mkdir /mnt/main/floppy >/dev/null 2>&1 mount --bind /mnt /mnt/main/mnt -if [ -n "$BINDHOME" -a -n "$MOUNT_IMAGE" ];then - mount --bind -o ro /$MOUNT_IMAGE /mnt/main/cdrom -else - mount --bind -o ro /cdrom /mnt/main/cdrom -fi +mount --bind -o ro /cdrom /mnt/main/cdrom + chroot /mnt/main mount -t sysfs /sys /sys > /dev/null 2>&1 -# also bind the usb device/dir, fstab should already be set up -if [ -z $USBSTORAGE ]; then - if [ -n $UsbMainModuleLoaded ]; then - mount --bind /mnt/usb /mnt/main/usb >/dev/null 2>&1 #necessary? - else - umount /mnt/usb >/dev/null 2>&1 - mkdir /mnt/main/mnt/usb >/dev/null 2>&1 - chroot /mnt/main mount /mnt/usb >/dev/null 2>&1 - fi -fi - # lots of stuff, might have to check which are _really_ necessary # but for now it should work reasonably well... @@ -680,10 +476,8 @@ fi # Read default keyboard from config file. -# There seems to be no reliable autoprobe possible. -# These are started in the background for the same reason as above + [ -f /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard -# Set default keyboard before interactive setup [ -n "$KEYTABLE" ] && chroot /mnt/main loadkeys -q $KEYTABLE & # Add configuration file of keymap distribution for the after of the @@ -711,29 +505,10 @@ fi 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= -# -### +chroot /mnt/main useradd -s /bin/bash $USERNAME +chroot /mnt/main chown -R $USERNAME.users /home/$USERNAME -HOMEDIR="$(getbootparam home)" -if test -z "$MYHOMEDIR" -o "$HOMEDIR" = "create" ;then - rm -rf /mnt/main/home/$USERNAME -# add the $USERNAME user, with a default homedir in /home/$USERNAME -# files are copied from /etc/skel in the main module - chroot /mnt/main useradd -m $USERNAME -s /bin/bash -else - chroot /mnt/main useradd -s /bin/bash $USERNAME - chroot /mnt/main chown -R $USERNAME.users /home/$USERNAME -fi - # make sure our users will have the locale exported by default - echo 'for i in `cat /etc/environment`; do export $i; done' >> /mnt/main/home/$USERNAME/.bashrc && chroot /mnt/main chown $USERNAME /home/$USERNAME/.bashrc & echo 'for i in `cat /etc/environment`; do export $i; done' >> /mnt/main/home/$USERNAME/.bash_profile && chroot /mnt/main chown $USERNAME /home/$USERNAME/.bash_profile & @@ -753,73 +528,14 @@ # save the persistant configuration echo "HOMEDIR='$MYHOMEDIR'">> /etc/sysconfig/morphix - -if [ -n "$MYHOMEDIR" -a -z "$BINDHOME" ]; then - if trymount "$MYHOMEDEVICE" "$MYHOMEMOUNTPOINT"; then - [ -f "$MYHOMEMOUNTPOINT/morphix.img" ] && MYHOMEDIR="$MYHOMEMOUNTPOINT/morphix.img" - while read device mountpoint fs relax; do - case "$mountpoint" in *$MYHOMEMOUNTPOINT*) - case "$fs" in *[Nn][Tt][Ff][Ss]*) - umount "$MYHOMEMOUNTPOINT"; eerror "ERROR: WON'T MOUNT NTFS FILESYSTEM ON $MYHOMEDEVICE READ/WRITE!" - break - ;; - *[Ff][Aa][Tt]*) -# Note: This currently won't work with encrypted partitions - umount "$MYHOMEMOUNTPOINT"; mount -t vfat -o rw,uid=$USERNAME,gid=users,umask=002 "$MYHOMEDEVICE" "$MYHOMEMOUNTPOINT" - if [ ! -f "$MYHOMEDIR" ]; then - ewarn "WARNING: FAT32 is not a good filesystem option for /home/$USERNAME (missing socket/symlink support)." - ewarn "WARNING: Better use an ext2 loopback file on this device, and boot with home=$MYHOMEDEVICE/morphix.img." - fi - ;; - esac - if mount -o remount,rw "$MYHOMEMOUNTPOINT"; then - ebegin "Mounting ${YELLOW}$MYHOMEDIR${NORMAL} as ${YELLOW}/home/$USERNAME${NORMAL}... " - if [ -f "$MYHOMEDIR" ]; then -# It's a loopback file, mount it over the /home/$USERNAME directory - mkdir /home/$USERNAME &>/dev/null - - trymount "$MYHOMEDIR" /home/$USERNAME - RC="$?" - [ "$RC" = "0" ] && ERROR="$(mount -o remount,rw,sync /home/$USERNAME 2>&1)" - RC="$?" - else -# Do a --bind mount - ERROR="$(mount --bind "$MYHOMEDIR" /home/$USERNAME 2>&1)" - RC="$?" - fi - mount --bind /home/$USERNAME /mnt/main/home/$USERNAME - [ "$RC" = "0" ] && einfo "/home/$USERNAME mounted OK." || { eerror "FAILED."; einfo "$ERROR"; } - fi - eend $? - break - ;; - esac - done <<EOT -$(cat /proc/mounts) -EOT - fi -fi - - if test -n "$SPLASH"; then if [ -e /proc/splash ]; then echo "show 64000">/proc/splash 2>/dev/null fi fi -# Bedankt Luuk! -# Permissions fixes -chmod 0777 /dev/zero chmod 0777 /mnt/main/var/tmp -# Small bugfix for /dev/tty0 problem -if [ ! -x /etc/init.d/udev ];then - rm /dev/tty0 - mknod /dev/tty0 c 4 0 - chmod 660 /dev/tty0 - chgrp tty /dev/tty0 -fi - [ -n "$NEWXMODULE" ] && { XMODULE="$NEWXMODULE" ; echo "XMODULE='$XMODULE'" >> /etc/sysconfig/morphix ; echo "XMODULE='$XMODULE'" >> /etc/sysconfig/xserver; } ### @@ -843,18 +559,6 @@ fi fi -# Start hotplug manager for PCI/USB/Firewire/Cardbus in mainmodule - -#if [ -n "$HOTPLUG" -a -x /mnt/main/sbin/hotplug ]; then -# echo " ${GREEN}Enabling hotplug manager.${NORMAL}" -# echo "/sbin/hotplug" > /proc/sys/kernel/hotplug -# chroot /mnt/main /etc/init.d/hotplug start >/dev/null 2>&1 -#fi - -#if [ ! -x /mnt/main/sbin/hotplug ]; then -# echo "${YELLOW} Couldn't find /sbin/hotplug in mainmodule, you probably want to add hotplug to it${NORMAL}" -#fi - ### # # Fat-Client-Version: DHCP Broadcast for IP address @@ -1073,52 +777,43 @@ USBBOOTING="$(getbootparam usbboot)" if [ -z "$USBSTORAGE" -a -z "$USBBOOTING" ]; then modprobe usb-storage >/dev/null 2>&1 - mkdir /mnt/sda1 >/dev/null 2>&1 - ln -s /mnt/sda1 /mnt/usb >/dev/null 2>&1 - echo "/dev/sda1 /mnt/sda1 auto noauto,users,exec,umask=000,uid=$USERNAME 0 0" >> /etc/fstab - mount /mnt/sda1 >/dev/null 2>&1 fi # -# Check USB device for mainmodules +# Check devices for mainmodule # if [ -z "$USBSTORAGE" ]; then - if [ -d /mnt/usb/mainmod ]; then - UsbMainModules="$(ls -d1 /mnt/usb/mainmod/*.mod 2> /dev/null)" - UsbMainModulesCount="$(ls -d1 /mnt/usb/mainmod/*.mod 2> /dev/null | wc -l)" - if [ $UsbMainModulesCount = 0 ]; then - einfo "No MainModules found on usb drive" - fi - if [ $UsbMainModulesCount = 1 ]; then - einfo "Loading MainModule from usb drive" - UsbMainModuleLoaded="$UsbMainModules" - load_module "$UsbMainModules" - elif [ $UsbMainModulesCount > 1 ]; then + MainModules="$(ls -d1 /media/*/mainmod/*.mod 2> /dev/null)" + MainModulesCount="$(ls -d1 /media/*/mainmod/*.mod 2> /dev/null | wc -l)" + if [ $MainModulesCount = 0 ]; then + einfo "No MainModules found on connected devices" + fi + if [ $MainModulesCount = 1 ]; then + einfo "Loading MainModule from connected device" + MainModuleLoaded="$MainModules" + load_module "$MainModules" + elif [ $MainModulesCount > 1 ]; then echo - einfo "More than one MainModule found on usb drive" + einfo "More than one MainModule found on devices" einfo "List of modules:" einfo "${WHITE} $UsbMainModules ${NORMAL}" echo PS3='Please enter the desired MainModule: ' - select UsbMainMod in $UsbMainModules + select MainMod in $MainModules do echo - einfo "Loading $UsbMainMod" + einfo "Loading $MainMod" echo - UsbMainModuleLoaded="$UsbMainMod" - load_module "$UsbMainMod" + MainModuleLoaded="$MainMod" + load_module "$MainMod" break done fi fi fi -if [ -z "$USBSTORAGE" -a -z "$USBBOOTING" ]; then - umount /mnt/sda1 >/dev/null 2>&1 -fi - ### # # Find MainModules from /cdrom, select if > 1 Modified: trunk/scripts-base/miniroot/debian/changelog =================================================================== --- trunk/scripts-base/miniroot/debian/changelog 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/miniroot/debian/changelog 2008-03-27 16:46:19 UTC (rev 2620) @@ -1,3 +1,9 @@ +miniroot-morphix (0.1-16) unstable; urgency=low + + * minor cleanups + + -- Alex de Landgraaf <al...@de...> Thu, 27 Mar 2008 17:41:07 +0100 + miniroot-morphix (0.1-15) unstable; urgency=low * Number of minor USB drive fixes (By Markus Mandalka) Modified: trunk/scripts-base/miniroot/linuxrc-scripts/linuxrc =================================================================== --- trunk/scripts-base/miniroot/linuxrc-scripts/linuxrc 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/miniroot/linuxrc-scripts/linuxrc 2008-03-27 16:46:19 UTC (rev 2620) @@ -621,27 +621,18 @@ mkdir -p /var/run /var/backups /var/local \ /var/tmp /var/lib /var/state/misc \ /mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \ - /home/root /etc/sysconfig /etc/X11 -# /home/morph -# /var/nis /var/preserve -# /var/spool/cups/tmp \ -# chown morph.morph /home/morph + /home/root /etc/sysconfig /etc/X11 /media + # Create empty utmp and wtmp :> /var/run/utmp :> /var/run/wtmp cp -a /MorphixCD/var/local /MorphixCD/var/log \ /var/ >/dev/null -# /MorphixCD/var/spool -# cp -a /MorphixCD/var/lib/nfs /MorphixCD/var/lib/xkb /MorphixCD/var/lib/isdn \ -# /MorphixCD/var/lib/pcmcia /var/lib/ 2>/dev/null -# Problematic directories in /var/lib (lots and lots of inodes) -# ln -s -#/MorphixCD/var/lib/dpkg /MorphixCD/var/lib/apt \ -# /MorphixCD/var/lib/scrollkeeper \ -# ln -s /var/lib/ 2>/dev/null + # Debian-apt # ln -s /MorphixCD/var/cache/apt /var/cache/ 2>/dev/null + rm /etc/resolv.conf 2>/dev/null ln -s /MorphixCD/etc/skel /etc/dhcpc/resolv.conf \ /etc/ >/dev/null @@ -652,8 +643,6 @@ cp -a /MorphixCD/dev/* /ramdisk/dev/ /bin/mount --bind /ramdisk/dev /dev -# Index files can be HUGE, so better replace cache/man tree by links later -# cp -a /MorphixCD/var/cache/man /var/cache/ 2>/dev/null # Create links from CDROM for UNWRITABLE (remaining) files cp -aus /MorphixCD/var/* /var/ >/dev/null @@ -661,24 +650,12 @@ cp -a /MorphixCD/etc/* /ramdisk/etc/ cp -a /etc/fstab /ramdisk/etc/ 2>/dev/null -# cp -a /etc/mtab /ramdisk/etc/ 2>/dev/null /bin/mount --bind /ramdisk/etc /etc -# Make SURE that these are files, not links! -# rm -rf /etc/passwd /etc/shadow /etc/group \ -# /etc/ppp /etc/isdn /etc/ssh /etc/ioctl.save \ -# /etc/inittab /etc/network /etc/sudoers \ -# /etc/init /etc/localtime /etc/dhcpc /etc/pnm2ppa.conf >/dev/null - -# cp -a /MorphixCD/etc/passwd /MorphixCD/etc/shadow /MorphixCD/etc/group \ -# /MorphixCD/etc/ppp /MorphixCD/etc/isdn /MorphixCD/etc/ssh \ -# /MorphixCD/etc/inittab /MorphixCD/etc/network /MorphixCD/etc/sudoers \ -# /MorphixCD/sbin/init /MorphixCD/etc/dhcpc /etc/ >/dev/null # Extremely important, init crashes on shutdown if this is only a link :> /etc/ioctl.save :> /etc/pnm2ppa.conf -# Diet libc bug workaround -# cp -f /MorphixCD/etc/localtime /etc/localtime + echo "${BLUE}Done.${NORMAL}" # Now tell kernel where the real modprobe lives Added: trunk/scripts-base/usr/sbin/linux_devices.py =================================================================== --- trunk/scripts-base/usr/sbin/linux_devices.py (rev 0) +++ trunk/scripts-base/usr/sbin/linux_devices.py 2008-03-27 16:46:19 UTC (rev 2620) @@ -0,0 +1,45 @@ +import os + +def get_device_partitions(prefix="usb-"): + """ + Assume: udev is enabled + """ + + udev_disks = "/dev/disk/by-id" + files = os.listdir(udev_disks) + disk_partitions = [] + for file in files: + if not file.startswith(prefix + "-") or file.find("-part") == -1: + continue + + file_str = file[4:] + parts = file_str.split("_") + if len(parts) < 2: + continue + if len(parts) < 3: + parts += [""] + + dest = os.readlink(udev_disks + "/" + file) + dest_dev = dest[-4:] + if len(dest_dev) != 4: + continue + + disk_partitions += [[file, parts[0] + " " + parts[1] + " " + parts[2], dest_dev]] + + return disk_partitions + +def get_partition_size(partition): + proc_partitions = "/proc/partitions" + + fd = open(proc_partitions, "r") + data = fd.read() + fd.close() + + data = data.split("\n") + for line in data[2:]: + line_data = line.split() + if len(line_data) != 4: + continue + if line_data[3] == partition: + return line_data[2] + return -1 Modified: trunk/scripts-base/usr/sbin/rebuildfstab =================================================================== --- trunk/scripts-base/usr/sbin/rebuildfstab 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/usr/sbin/rebuildfstab 2008-03-27 16:46:19 UTC (rev 2620) @@ -4,101 +4,7 @@ # slightly editted for morphix usage # # $Id$ -# -PATH="/bin:/sbin:/usr/bin:/usr/sbin" -export PATH -umask 022 +# Removed, now using rebuildfstab-morphix instead -[ ! -e /proc/partitions ] && { echo "$0: /proc not mounted, exiting" >&2; exit 1; } - -if [ -e /var/run/rebuildfstab.pid ]; then - ps "$(</var/run/rebuildfstab.pid)" >/dev/null 2>&1 && exit 0 - rm -f /var/run/rebuildfstab.pid -fi - -echo "$$" >/var/run/rebuildfstab.pid - -XSH="" -[ -n "$DISPLAY" ] && XSH="rxvt -bg black -fg green -cr red -T $0 -e" - -[ "`id -u`" != "0" ] && { exec $XSH sudo $0 "$@"; } - - -TMP="/tmp/fstab.$$.tmp" -ADDEDBYKNOPPIX="# Added by Morphix" - -# Simple shell grep, searches for lines STARTING with string -stringinfile(){ -while read line; do -case "$line" in $1*) return 0;; esac -done <"$2" -return 1 -} - -removeentries(){ -# Remove comment line $1 and the following line from file $2 -# sed '/^# Added by KNOPPIX/{N;d;}' -while read line; do -case "$line" in $1) read line; continue ;; esac -echo "$line" -done <"$2" -} - -verbose="" -remove="" -user="" -group="" -arg="$1" -while [ -n "$arg" ]; do - case "$arg" in - -v*) verbose="yes" ;; - -r*) remove="yes" ;; - -u*) shift; user="$1" ;; - -g*) shift; group="$1" ;; - *) echo "Usage: $0 [-v[erbose]] [-r[emove_old]] [-u[ser] uid] [ -g[roup] gid]" ;; - esac - shift - arg="$1" -done - -[ -n "$verbose" ] && echo "Scanning for new harddisks/partitions..." >&2 -rm -f "$TMP" - -if [ -n "$remove" ]; then - removeentries "$ADDEDBYKNOPPIX" /etc/fstab >"$TMP" -else - cat /etc/fstab >"$TMP" -fi - -count=0 -while read device mountpoint fstype relax; do - stringinfile "$device " "$TMP" || \ - { count="$((count + 1))" - [ -d "$mountpoint" ] || mkdir -p "$mountpoint" 2>/dev/null - options="noauto,users,exec" - case "$fstype" in - ntfs) options="${options},ro,umask=000" ;; - vfat|msdos) options="${options},umask=000" ;; - swap) options="defaults" ;; - esac - case "$fstype" in - ntfs|vfat|msdos) - [ -n "$user" ] && options="$options,uid=$user" - [ -n "$group" ] && options="$options,gid=$group" - ;; - esac - echo "$ADDEDBYKNOPPIX" - echo "$device $mountpoint $fstype $options 0 0"; } -done >>"$TMP" <<EOT -$(scanpartitions) -EOT - -[ -n "$verbose" ] && { [ "$count" -gt 0 ] && echo "Adding $count new partitions to /etc/fstab." >&2 || echo "No new partitions found." >&2; } -mv -f "$TMP" /etc/fstab - -rm -f /var/run/rebuildfstab.pid - -[ -n "$DISPLAY" ] && sleep 2 - exit 0 Added: trunk/scripts-base/usr/sbin/rebuildfstab-morphix =================================================================== --- trunk/scripts-base/usr/sbin/rebuildfstab-morphix (rev 0) +++ trunk/scripts-base/usr/sbin/rebuildfstab-morphix 2008-03-27 16:46:19 UTC (rev 2620) @@ -0,0 +1,48 @@ +#!/usr/bin/python +# $Id$ + +# A small script to rebuild the fstab file using udev +# (instead of the aging Knoppix-routine in rebuildfstab) +# We assume udev has been enabled for /dev before running this script +# Also makes the directories under /media for all devices + +# Makes use of the python-minimal package, in order to minimize base size + +# First argument to this script should be the username of the Morphix user, +# else this is 'morph' + +from linux_devices import get_device_partitions, get_partition_size +import sys, os + +if len(sys.argv) > 1: + username = sys.argv[1] +else: + username = "morph" + +# Basic initial fstab + +fstab = "/proc /proc proc defaults 0 0\n\ +/sys /sys sysfs noauto 0 0\n\ +/dev/pts /dev/pts devpts mode=0622 0 0\n\ +/dev/fd0 /media/floppy auto user,noauto,exec,umask=000,uid=" + username + " 0 0\n\ +/dev/cdrom /media/cdrom auto user,noauto,exec,ro,uid=" + username + " 0 0\n" + +def add_to_fstab(fstab, partitions, username): + + for p in partitions: + system("mkdir -p /media/" + p[2]) + line = "/dev/" + p[2] + " /media/" + p[2] + " auto defaults,users,uid=" + username + " 0 0\n" + fstab += line + return fstab + +# Add these to the fstab + +fstab = add_to_fstab(fstab, get_device_partitions("ata"), username) +fstab = add_to_fstab(fstab, get_device_partitions("scsi"), username) +fstab = add_to_fstab(fstab, get_device_partitions("usb"), username) + +fd = open("/etc/fstab", "w") +fd.write(fstab) +fd.close() + + Property changes on: trunk/scripts-base/usr/sbin/rebuildfstab-morphix ___________________________________________________________________ Name: svn:executable + * Modified: trunk/scripts-base/usr/sbin/scanpartitions =================================================================== --- trunk/scripts-base/usr/sbin/scanpartitions 2008-03-19 23:12:50 UTC (rev 2619) +++ trunk/scripts-base/usr/sbin/scanpartitions 2008-03-27 16:46:19 UTC (rev 2620) @@ -1,91 +1,4 @@ #!/bin/bash -# (C) Klaus Knopper Nov 2002 -# Reads /proc/partitions, returns table of the form -# basename(devicefile) mountpoint filesystemtype -# Useful for automatic generation of /etc/fstab entries (you -# still may have to add noauto 0 0). -# # $Id$ -# -[ ! -e /proc/partitions ] && { echo "$0: /proc not mounted, exiting" >&2; exit 1; } - -fstype(){ -[ -n "$1" ] || return 1 - -# Check if partition is already mounted -while read device mountpoint filesystem relax; do -case "$device" in *$1*) echo "$filesystem"; return 0;; esac -done <<EOT -$(cat /proc/mounts) -EOT - -# Check if a device/medium is present at all -dd if="$1" count=1 bs=1024 >/dev/null 2>&1 || return 2 -FILE="$(LANG=C LC_ALL=C LC_MESSAGES=C file -Ls "$1")" -[ "$?" = "0" ] || return 2 - -# File systems to try first -FILESYSTEMS="" -case "$FILE" in -*[Ff][Aa][Tt]*|*[Xx]86*) FILESYSTEMS="vfat msdos ntfs";; -*[Rr][Ee][Ii][Ss][Ee][Rr]*) echo "reiserfs"; return 0;; -*[Xx][Ff][Ss]*) echo "xfs"; return 0;; -*[Ee][Xx][Tt]3*) echo "ext3"; return 0;; -*[Ee][Xx][Tt]2*) echo "ext2"; return 0;; -*[Ss][Ww][Aa][Pp]*) echo "swap"; return 0;; -esac -# It seems that only reliable way to identify the filesystem is to attempt a mount -TMPDIR="/tmp/autmount.${1##*/}.$$.dir" -mkdir -p "$TMPDIR" || return 3 -FS="" -# Don't clobber console while attemting a mount -read LOGLEVEL relax < /proc/sys/kernel/printk -echo "0" >/proc/sys/kernel/printk -for f in $FILESYSTEMS $(</etc/filesystems); do -mount -r -t "$f" "$1" "$TMPDIR" >/dev/null 2>&1 && { umount "$TMPDIR"; FS="$f"; break; } -umount -f "$TMPDIR" >/dev/null 2>&1 -done -echo "$LOGLEVEL" >/proc/sys/kernel/printk -rmdir "$TMPDIR" -[ -n "$FS" ] && echo "$FS" || return 4 -} - -### - -if [ -z "$1" ]; then -partitions="" -disks="" -pold="none" -while read major minor blocks partition relax; do -partition="${partition##*/}" -[ -z "$partition" -o ! -e "/dev/$partition" ] && continue -[ "$blocks" -lt 2 ] && continue -case "$partition" in -[hs]d?) disks="$disks $partition";; -loop*) continue;; -*) partitions="$partitions /dev/$partition";; -esac -done <<EOT -$(awk 'BEGIN{old="__start"}{if($0==old){exit}else{old=$0;if($4&&$4!="name"){print $0}}}' /proc/partitions) -EOT - -# Add disks without partition table (probably ZIP drives) -for d in $disks; do -case "$partitions" in */dev/$d*) continue;; esac -partitions="$partitions /dev/$d" -done -else -partitions="$*" -fi - -for p in $partitions; do -fs="auto" -scanfs="$(fstype $p)" -[ -n "$scanfs" ] && fs="$scanfs" -mountpoint="/mnt/${p##*/}" -[ "$fs" = "swap" ] && mountpoint="none" -echo "${p}" "${mountpoint}" "${fs}" -done - -exit 0 +# Removed, see rebuildfstab-morphix This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-03-30 20:09:26
|
Revision: 2621 http://morphix.svn.sourceforge.net/morphix/?rev=2621&view=rev Author: alextreme Date: 2008-03-30 13:09:22 -0700 (Sun, 30 Mar 2008) Log Message: ----------- * small number of fixes to base bootscripts Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/alsa-autoconfig trunk/scripts-base/etc/init.d/knoppix-autoconfig trunk/scripts-base/etc/init.d/morphix-start trunk/scripts-base/usr/sbin/rebuildfstab-morphix Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2008-03-27 16:46:19 UTC (rev 2620) +++ trunk/scripts-base/debian/changelog 2008-03-30 20:09:22 UTC (rev 2621) @@ -1,3 +1,9 @@ +morphix-base-scripts (0.5-66) unstable; urgency=low + + * bug-fix + + -- Alex de Landgraaf <al...@de...> Fri, 28 Mar 2008 12:04:01 +0100 + morphix-base-scripts (0.5-65) unstable; urgency=low * Large cleanup of pre-udev stuff, restructuring loading of main/minimods Modified: trunk/scripts-base/etc/init.d/alsa-autoconfig =================================================================== --- trunk/scripts-base/etc/init.d/alsa-autoconfig 2008-03-27 16:46:19 UTC (rev 2620) +++ trunk/scripts-base/etc/init.d/alsa-autoconfig 2008-03-30 20:09:22 UTC (rev 2621) @@ -22,6 +22,7 @@ if [ -n "$ALSAPATH" ]; then +mkdir /etc/modutils cat << EOF > /etc/modutils/1alsa path[misc]=$ALSAPATH depfile=$ALSAPATH/modules.dep Modified: trunk/scripts-base/etc/init.d/knoppix-autoconfig =================================================================== --- trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-03-27 16:46:19 UTC (rev 2620) +++ trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-03-30 20:09:22 UTC (rev 2621) @@ -642,6 +642,20 @@ done </etc/fstab fi +# Mount all filesystems listed in fstab (read-only) +# fstab has been generated by rebuildfstab-morphix in knoppix-autoconfig + +mount -a -r + +# Proc and sys need to be writable + +mount -t proc proc /proc 2>/dev/null +mount -t sysfs /sys /sys 2>/dev/null + +# /media/cdrom doesn't mount automatically + +mount /media/cdrom + if test -n "$SPLASH"; then echo "show 32000">/proc/splash 2>/dev/null fi @@ -721,12 +735,12 @@ fi # Check for extra shellscript on CD-Rom (/cdrom/base/morphix.sh) for i in morphix.sh MORPHIX.SH MORPHIX.sh Morphix.sh; do - if [ -f /cdrom/base/$i ]; then + if [ -f /media/cdrom/base/$i ]; then echo "" FOUND_CONFIG="yes" - echo " ${GREEN}Morphix Configuration file found in /cdrom/base, executing ${MAGENTA}$i${GREEN}.${NORMAL}" + echo " ${GREEN}Morphix Configuration file found in /media/cdrom/base, executing ${MAGENTA}$i${GREEN}.${NORMAL}" echo "6" > /proc/sys/kernel/printk - . /cdrom/base/$i /cdrom/base || true + . /media/cdrom/base/$i /media/cdrom/base || true echo "0" > /proc/sys/kernel/printk break fi Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2008-03-27 16:46:19 UTC (rev 2620) +++ trunk/scripts-base/etc/init.d/morphix-start 2008-03-30 20:09:22 UTC (rev 2621) @@ -44,83 +44,6 @@ unset SPLASH fi -findfile(){ - FOUND="" -# search all partitions for a file in the root directory - for i in /mnt/[sh]d[a-z] /mnt/[sh]d[a-z][1-9] /mnt/[sh]d[a-z][1-9]?*; do -# See if it's already mounted - [ -f "$i/$1" ] && { echo "$i/$1"; return 0; } - if [ -d "$i" ] && mount -r "$i" 2>/dev/null; then - [ -f "$i/$1" ] && FOUND="$i/$1" - umount -l "$i" 2>/dev/null - [ -n "$FOUND" ] && { echo "$FOUND"; return 0; } - fi - done - return 2 -} - -### -# -# create the home image -# look for USB memory device first -# -### - -createfile(){ -FOUND="" -# search all partitions for a file in the root directory -for i in /mnt/sd[a-z] /mnt/sd[a-z][1-9] /mnt/hd[a-z][1-9] /mnt/hd[a-z] /mnt/[sh]d[a-z][1-9]?*; do - # See if it's already mount ant exist - [ -f "$i/$1" ] && { echo "$i/$1"; return 0; } - - # mountit and create - if [ -d "$i" ] && mount -o rw "$i" 2>/dev/null; - then - # See if it's already exist - if [ -f "$i/$1" ];then - FOUND="$i/$1" - umount -l "$i" 2>/dev/null - echo "$FOUND" - return 0 - fi - - MIN_HOME="51200" - MAX_HOME="102400" - fs=`mount | grep $i |while read mdev mon mount mtype mfs mopt;do echo $mfs;done`; - case "$fs" in *[Nn][Tt][Ff][Ss]*) -;; -*) - DEVICE_SIZE=`LANG=C df -hk $i | tail -n1| cut -c 41-50` - if test -n "$DEVICE_SIZE" -a "$(expr $DEVICE_SIZE / 1)" -gt "$MAX_HOME"; then - if dd if=/dev/zero of=$i/$1 bs=1K count=$MAX_HOME;then - mke2fs -q -F $i/$1 - e2fsck -y $i/$1 - umount -l "$i" 2>/dev/null - FOUND="$i/$1" - echo "$FOUND" - return 0 - fi - fi - - if test -n "$DEVICE_SIZE" -a "$(expr $DEVICE_SIZE / 1)" -gt "$MIN_HOME"; then - if dd if=/dev/zero of=$i/$1 bs=1K count=$MIN_HOME;then - mke2fs -q -F $i/$1 - e2fsck -y $i/$1 - umount -l "$i" 2>/dev/null - FOUND="$i/$1" - echo "$FOUND" - return 0 - else - umount -l "$i" 2>/dev/null - fi - fi - ;; - esac - fi - done -return 2 -} - # Try to mount this filesystem read-only, without or with encryption trymount(){ @@ -187,67 +110,6 @@ ### # -# MiniModule loading section -# -### - -# Mount MiniModules here so we can determine the mount overlay command options -mount_mini_modules() { - - CdromMiniModules="$(ls /cdrom/minimod/*.mod 2> /dev/null )" - CdromMiniModulesCount="$(ls -1 /cdrom/minimod/*.mod 2> /dev/null | wc -l )" - - for file in $CdromMiniModules; do - load_mini_module "$file" $MiniModuleCount >/dev/null 2>&1 - if [ $? -eq 0 ]; then - ((MiniModuleCount += 1)) - fi - done - -} - -load_mini_module() { - - file="$1" - countarg="$2" - count=$(($countarg+2)) # we have a base module, and a mainmodule loaded - - if [ ! -d /mnt/main/mnt/mini/mod$count ]; then - mkdir -p /mnt/main/mnt/mini/mod$count - mount_module $file /mnt/main/mnt/mini/mod$count $count - fi - return 0 -} - -# Work out mount options so we can support minimodule overlays. -mount_options () { - - # Currently we only support unionfs - UNIONFS="on" - export UNIONFS - - # This shouldn't be necessary, - # as --add overlaying is in load-minimodules.sh - - for d in /mnt/main/mnt/mini/mod*; do - if [ -f ${d}/morphix/mini_module.conf ]; then - unset MINI_MODULE_OVERLAY - . ${d}/morphix/mini_module.conf >/dev/null 2>&1 - if [ -n $MINI_MODULE_OVERLAY ]; then - if [ $MINI_MODULE_OVERLAY == "1" ] || [ $MINI_MODULE_OVERLAY == "[yY][eE][sS]" ]; then - # add support for other overlayfs's here. - if [ "$UNIONFS" == "on" ]; then - UNIONFS_MOUNT_OPT=${UNIONFS_MOUNT_OPT}:${d}=ro - fi - fi - fi - fi - done - -} - -### -# # MainModule loading section # ### @@ -314,7 +176,6 @@ mkdir -p $DIR2/modules >/dev/null 2>&1 mount -t unionfs -o dirs=$DIR2/root=rw:/mnt/main_ro=ro${UNIONFS_MOUNT_OPT} none /mnt/main - fi eend $? mount -t unionfs -o dirs=$DIR2/modules=rw:/MorphixCD/lib/modules=ro none /mnt/main/lib/modules @@ -363,15 +224,6 @@ mount --bind /home /mnt/main/home mount --bind /home/root /mnt/main/root -# Mount all harddisk partitions read-only (backgrounded) -# Updated for udev - -for i in /mnt/main/media/[sh]d[a-z][1-9]; do - if [ -d "$i" ]; then - mount -r "$i" & - fi -done - mkdir /mnt/main/MorphixCD 2> /dev/null mount --bind -o ro /MorphixCD /mnt/main/MorphixCD @@ -391,6 +243,7 @@ mkdir /mnt/main/floppy >/dev/null 2>&1 mount --bind /mnt /mnt/main/mnt +mount --bind /media /mnt/main/media mount --bind -o ro /cdrom /mnt/main/cdrom chroot /mnt/main mount -t sysfs /sys /sys > /dev/null 2>&1 @@ -506,6 +359,7 @@ fi chroot /mnt/main useradd -s /bin/bash $USERNAME +chroot /mnt/main mkdir -p /home/$USERNAME chroot /mnt/main chown -R $USERNAME.users /home/$USERNAME # make sure our users will have the locale exported by default @@ -631,14 +485,8 @@ echo "nameserver $ETHDNS" >> /mnt/main/etc/resolv.conf fi -# If not using usb as /cdrom, also check the mounted /mnt/usb for -# DCE directories +deb_copy_exec /media/cdrom -deb_copy_exec /cdrom -if [ -z "$USBSTORAGE" ]; then - deb_copy_exec /mnt/usb -fi - # --- # Load minimodules @@ -783,82 +631,38 @@ # Check devices for mainmodule # -if [ -z "$USBSTORAGE" ]; then - MainModules="$(ls -d1 /media/*/mainmod/*.mod 2> /dev/null)" - MainModulesCount="$(ls -d1 /media/*/mainmod/*.mod 2> /dev/null | wc -l)" - if [ $MainModulesCount = 0 ]; then - einfo "No MainModules found on connected devices" - fi - if [ $MainModulesCount = 1 ]; then - einfo "Loading MainModule from connected device" - MainModuleLoaded="$MainModules" - load_module "$MainModules" - elif [ $MainModulesCount > 1 ]; then - echo - einfo "More than one MainModule found on devices" - einfo "List of modules:" - einfo "${WHITE} $UsbMainModules ${NORMAL}" - echo - PS3='Please enter the desired MainModule: ' - - select MainMod in $MainModules - do - echo - einfo "Loading $MainMod" - echo - MainModuleLoaded="$MainMod" - load_module "$MainMod" - break - done - fi - fi -fi -### -# -# Find MainModules from /cdrom, select if > 1 -# -### - -if [ -z "$MYMAINDIR" ]; then - MainModules="$(ls -d1 /cdrom/mainmod/*.mod 2> /dev/null )" - MainModulesCount="$(ls -d1 /cdrom/mainmod/*.mod 2> /dev/null | wc -l )" -fi - -if [ $MainModulesCount = 0 ]; -then - einfo "No MainModules found" - einfo "Continuing with MorphixBase..." - echo - einfo "This is a thinned-down distribution based on Debian GNU/Linux" - einfo " Check to see if your MainModule is on the liveCD in /cdrom/mainmod" +MainModules="$(ls -d1 /media/*/mainmod/*.mod 2> /dev/null)" +MainModulesCount="$(ls -d1 /media/*/mainmod/*.mod 2> /dev/null | wc -l)" +if [ $MainModulesCount = 0 ]; then + einfo "No MainModules found on connected devices" +elif [ $MainModulesCount = 1 ]; then + einfo "Loading MainModule from connected device" + MainModuleLoaded="$MainModules" + load_module "$MainModules" +elif [ $MainModulesCount > 1 ]; then echo -elif [ $MainModulesCount = 1 ]; - then -# start single-module section - echo - einfo "One MainModule found: $MainModules" - echo - mount_mini_modules - mount_options - load_module "$MainModules" - -# start multiple-module section -elif [ $MainModulesCount -gt 1 ]; then - echo - einfo "More than one MainModule found" - einfo "List of modules:" - einfo "${WHITE} $MainModules${NORMAL}" - echo - PS3='Please enter the desired MainModule: ' - - select MainMod in $MainModules - do - echo - load_module "$MainMod" - break - done -else - eerror "Error reading CDROM?" + einfo "More than one MainModule found on devices" + einfo "List of modules:" + einfo "${WHITE} $UsbMainModules ${NORMAL}" + echo + PS3='Please enter the desired MainModule: ' + + select MainMod in $MainModules + do + echo + einfo "Loading $MainMod" + echo + MainModuleLoaded="$MainMod" + load_module "$MainMod" + break + done fi +einfo "No MainModules found" +einfo "Continuing with MorphixBase..." +echo +einfo "This is a thinned-down distribution based on Debian GNU/Linux" +einfo " Check to see if your MainModule is on the liveCD in /media/cdrom/mainmod" +echo + Modified: trunk/scripts-base/usr/sbin/rebuildfstab-morphix =================================================================== --- trunk/scripts-base/usr/sbin/rebuildfstab-morphix 2008-03-27 16:46:19 UTC (rev 2620) +++ trunk/scripts-base/usr/sbin/rebuildfstab-morphix 2008-03-30 20:09:22 UTC (rev 2621) @@ -27,10 +27,13 @@ /dev/fd0 /media/floppy auto user,noauto,exec,umask=000,uid=" + username + " 0 0\n\ /dev/cdrom /media/cdrom auto user,noauto,exec,ro,uid=" + username + " 0 0\n" +os.system("mkdir -p /media/cdrom") +os.system("mkdir -p /media/floppy") + def add_to_fstab(fstab, partitions, username): for p in partitions: - system("mkdir -p /media/" + p[2]) + os.system("mkdir -p /media/" + p[2]) line = "/dev/" + p[2] + " /media/" + p[2] + " auto defaults,users,uid=" + username + " 0 0\n" fstab += line return fstab This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-04-05 13:28:41
|
Revision: 2622 http://morphix.svn.sourceforge.net/morphix/?rev=2622&view=rev Author: alextreme Date: 2008-04-05 06:27:18 -0700 (Sat, 05 Apr 2008) Log Message: ----------- * another list of base-script modifications (automatic startup of cups, networkmanager, ntp, /media fixes) Modified Paths: -------------- trunk/scripts-base/etc/init.d/knoppix-autoconfig trunk/scripts-base/etc/init.d/load-minimodules.sh trunk/scripts-base/etc/init.d/morphix-start trunk/scripts-base/usr/sbin/rebuildfstab-morphix Modified: trunk/scripts-base/etc/init.d/knoppix-autoconfig =================================================================== --- trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-03-30 20:09:22 UTC (rev 2621) +++ trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-04-05 13:27:18 UTC (rev 2622) @@ -642,11 +642,7 @@ done </etc/fstab fi -# Mount all filesystems listed in fstab (read-only) # fstab has been generated by rebuildfstab-morphix in knoppix-autoconfig - -mount -a -r - # Proc and sys need to be writable mount -t proc proc /proc 2>/dev/null Modified: trunk/scripts-base/etc/init.d/load-minimodules.sh =================================================================== --- trunk/scripts-base/etc/init.d/load-minimodules.sh 2008-03-30 20:09:22 UTC (rev 2621) +++ trunk/scripts-base/etc/init.d/load-minimodules.sh 2008-04-05 13:27:18 UTC (rev 2622) @@ -25,25 +25,23 @@ countarg="$2" count=$(($countarg+2)) # we have a base module, and a mainmodule loaded - # /etc/init.d/morphix-start will mount cdrom minimodules. - # But just incase - if [ ! -d /mnt/main/mnt/mini/mod$count ]; then - chroot /mnt/main mkdir /mnt/mini/mod$count + if [ ! -d /mnt/mini/mod$count ]; then + mkdir -p /mnt/mini/mod$count # this not chrooted, so mount_module only needs to be in base - mount_module $file /mnt/main/mnt/mini/mod$count $count >/dev/null 2>&1 + mount_module $file /mnt/mini/mod$count $count >/dev/null 2>&1 fi echo "$count" > /mnt/mini/num_loaded # Unionfs overlaying # Add the /root dir to be the unionfs branch after the first component (which should be 0 and rw...) - if [ -d /mnt/main/mnt/mini/mod$count/root ]; then - mount -t unionfs -o remount,add=:/mnt/main/mnt/mini/mod$count/root=ro none /mnt/main + if [ -d /mnt/mini/mod$count/root ]; then + mount -t unionfs -o remount,add=:/mnt/mini/mod$count/root=ro none / fi - if [ -e /mnt/main/mnt/mini/mod$count/morphix/loadmod.sh ]; then + if [ -e /mnt/mini/mod$count/morphix/loadmod.sh ]; then einfo "Starting /mnt/mini/mod$count/morphix/loadmod.sh" - chroot /mnt/main sh /mnt/mini/mod$count/morphix/loadmod.sh /mnt/mini/mod$count + sh /mnt/mini/mod$count/morphix/loadmod.sh /mnt/mini/mod$count else einfo "Not able to find /mnt/mini/mod$count/morphix/loadmod.sh, continuing" fi @@ -65,7 +63,6 @@ NOUSB="$(getbootparam nousb)" if [ -z "$NOUSB" ]; then einfo "Checking for MiniModules on connected devices" - modprobe usb-storage >/dev/null 2>&1 MiniModules="$(ls /media/*/minimod/*.mod 2> /dev/null)" for file in $MiniModules @@ -75,16 +72,5 @@ done fi -# checks for all minimodules on /cdrom/minimod -echo -einfo "Checking for MiniModules on CDROM" -CdromMiniModules="$(ls /cdrom/minimod/*.mod 2> /dev/null )" -for file in $CdromMiniModules - do - load_mini_module "$file" $MiniModuleCount - ((MiniModuleCount += 1)) -done -# All changes have been made, ready to chroot to MainModule - Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2008-03-30 20:09:22 UTC (rev 2621) +++ trunk/scripts-base/etc/init.d/morphix-start 2008-04-05 13:27:18 UTC (rev 2622) @@ -243,7 +243,7 @@ mkdir /mnt/main/floppy >/dev/null 2>&1 mount --bind /mnt /mnt/main/mnt -mount --bind /media /mnt/main/media +mount --bind -o ro /media/cdrom /mnt/main/media/cdrom mount --bind -o ro /cdrom /mnt/main/cdrom chroot /mnt/main mount -t sysfs /sys /sys > /dev/null 2>&1 @@ -257,6 +257,7 @@ cp -af /MorphixCD/etc/localtime /mnt/main/etc/localtime >/dev/null 2>&1 cp -af /etc/filesystems /mnt/main/etc/filesystems >/dev/null 2>&1 cp -af /etc/modules.conf /mnt/main/etc/modules.conf >/dev/null 2>&1 +cp -af /MorphixCD/etc/morphix.d /mnt/main/etc/morphix.d >/dev/null 2>&1 #Copy alsa aliases if [ -n "$SOUND_DRIVER" ];then @@ -291,6 +292,9 @@ # detected filesystems cp -af /etc/fstab /mnt/main/etc/fstab +# Mount all filesystems +chroot /mnt/main mount -a -F + # network stuff cp -af /etc/network/* /mnt/main/etc/network/ >/dev/null 2>&1 @@ -485,12 +489,64 @@ echo "nameserver $ETHDNS" >> /mnt/main/etc/resolv.conf fi +#### +# +# Start Network Time Protocol daemon, if it exists +# +#### + +NONTP="$(getbootparam nontp)" + +if [ -z "$NONTP" ]; then + if [ -e /mnt/main/etc/init.d/ntp ]; then + chroot /mnt/main /etc/init.d/ntp start & + fi +fi + +#### +# +# Start cups, if it exists in the main module +# +#### + +NOPRINTING="$(getbootparam noprinting)" + +if [ -z "$NOPRINTING" ]; then + if [ -e /mnt/main/etc/init.d/cupsys ]; then + chroot /mnt/main /etc/init.d/cupsys start & + fi +fi + +#### +# +# Start NetworkManager, if it exists in the main module +# +#### + +NONW="$(getbootparam nonetworkmanager)" + +if [ -z "$NONW" ]; then + if [ -e /mnt/main/etc/init.d/network-manager ]; then + chroot /mnt/main /etc/init.d/network-manager start & + fi +fi + +#### +# +# Check /deb /copy /exec cdrom-directories for files +# +#### + deb_copy_exec /media/cdrom -# --- -# Load minimodules +#### +# +# Load minimodules (from chroot) +# +#### -sh /etc/init.d/load-minimodules.sh +cp /etc/init.d/load-minimodules /mnt/main/etc/init.d/ +chroot /mnt/main sh /etc/init.d/load-minimodules.sh ### # Modified: trunk/scripts-base/usr/sbin/rebuildfstab-morphix =================================================================== --- trunk/scripts-base/usr/sbin/rebuildfstab-morphix 2008-03-30 20:09:22 UTC (rev 2621) +++ trunk/scripts-base/usr/sbin/rebuildfstab-morphix 2008-04-05 13:27:18 UTC (rev 2622) @@ -24,8 +24,8 @@ fstab = "/proc /proc proc defaults 0 0\n\ /sys /sys sysfs noauto 0 0\n\ /dev/pts /dev/pts devpts mode=0622 0 0\n\ -/dev/fd0 /media/floppy auto user,noauto,exec,umask=000,uid=" + username + " 0 0\n\ -/dev/cdrom /media/cdrom auto user,noauto,exec,ro,uid=" + username + " 0 0\n" +/dev/fd0 /media/floppy auto users,auto,exec 0 0\n\ +/dev/cdrom /media/cdrom auto user,auto,exec,ro 0 0\n" os.system("mkdir -p /media/cdrom") os.system("mkdir -p /media/floppy") @@ -34,7 +34,7 @@ for p in partitions: os.system("mkdir -p /media/" + p[2]) - line = "/dev/" + p[2] + " /media/" + p[2] + " auto defaults,users,uid=" + username + " 0 0\n" + line = "/dev/" + p[2] + " /media/" + p[2] + " auto defaults,users,auto,exec 0 0\n" fstab += line return fstab This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-04-05 18:16:32
|
Revision: 2623 http://morphix.svn.sourceforge.net/morphix/?rev=2623&view=rev Author: alextreme Date: 2008-04-05 11:15:43 -0700 (Sat, 05 Apr 2008) Log Message: ----------- * minor fix, new version of base script packages Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/morphix-start Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2008-04-05 13:27:18 UTC (rev 2622) +++ trunk/scripts-base/debian/changelog 2008-04-05 18:15:43 UTC (rev 2623) @@ -1,3 +1,15 @@ +morphix-base-scripts (0.5-67) unstable; urgency=low + + * more fixes, stuff might actually be working now. + * /media is now used, partitions are automounted at boottime + * added searching for /minimod directory on all partitions, + thus minimodules from harddisks or usb storage devices will be + used (ie. use this together with make-mini-home) + * Knoppix-style usage of homedir-loading has been removed (probably didn't work anyway) + * cups, networkmanager and ntp are started at boottime by default in mainmodule + + -- Alex de Landgraaf <al...@de...> Sat, 05 Apr 2008 20:10:50 +0200 + morphix-base-scripts (0.5-66) unstable; urgency=low * bug-fix Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2008-04-05 13:27:18 UTC (rev 2622) +++ trunk/scripts-base/etc/init.d/morphix-start 2008-04-05 18:15:43 UTC (rev 2623) @@ -195,10 +195,8 @@ [ -d /mnt/main/tmp ] && mount --bind /var/tmp /mnt/main/tmp mount --bind /boot /mnt/main/boot - if [ -x /etc/init.d/udev ];then + if [ -x /etc/init.d/udev ]; then mount --bind /dev /mnt/main/dev - - else if [ -n "$UNIONFS" ]; then mount -t unionfs -o dirs=$DIR2/dev=rw:/MorphixCD/dev=ro none /mnt/main/dev 2>&1 @@ -292,6 +290,8 @@ # detected filesystems cp -af /etc/fstab /mnt/main/etc/fstab +mount --bind /media /mnt/main/media + # Mount all filesystems chroot /mnt/main mount -a -F @@ -545,7 +545,7 @@ # #### -cp /etc/init.d/load-minimodules /mnt/main/etc/init.d/ +cp /etc/init.d/load-minimodules.sh /mnt/main/etc/init.d/ chroot /mnt/main sh /etc/init.d/load-minimodules.sh ### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-04-15 16:11:00
|
Revision: 2628 http://morphix.svn.sourceforge.net/morphix/?rev=2628&view=rev Author: alextreme Date: 2008-04-15 09:09:46 -0700 (Tue, 15 Apr 2008) Log Message: ----------- * bumping, scd0-fix Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/knoppix-autoconfig trunk/scripts-base/miniroot/debian/changelog trunk/scripts-base/miniroot/linuxrc-scripts/debian/changelog Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2008-04-15 16:03:27 UTC (rev 2627) +++ trunk/scripts-base/debian/changelog 2008-04-15 16:09:46 UTC (rev 2628) @@ -1,3 +1,9 @@ +morphix-base-scripts (0.5-68) unstable; urgency=low + + * USB/SCSI fixes + + -- Alex de Landgraaf <al...@de...> Tue, 15 Apr 2008 18:08:30 +0200 + morphix-base-scripts (0.5-67) unstable; urgency=low * more fixes, stuff might actually be working now. Modified: trunk/scripts-base/etc/init.d/knoppix-autoconfig =================================================================== --- trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-04-15 16:03:27 UTC (rev 2627) +++ trunk/scripts-base/etc/init.d/knoppix-autoconfig 2008-04-15 16:09:46 UTC (rev 2628) @@ -652,6 +652,11 @@ mount /media/cdrom +# For SCSI/USB CDROM drives +if [ ! -f "/media/cdrom/base" ]; then + mount --bind /cdrom /media/cdrom +fi + if test -n "$SPLASH"; then echo "show 32000">/proc/splash 2>/dev/null fi Modified: trunk/scripts-base/miniroot/debian/changelog =================================================================== --- trunk/scripts-base/miniroot/debian/changelog 2008-04-15 16:03:27 UTC (rev 2627) +++ trunk/scripts-base/miniroot/debian/changelog 2008-04-15 16:09:46 UTC (rev 2628) @@ -1,3 +1,9 @@ +miniroot-morphix (0.1-17) unstable; urgency=low + + * Changes to get USB/SCSI devices working again + + -- Alex de Landgraaf <al...@de...> Tue, 15 Apr 2008 17:29:26 +0200 + miniroot-morphix (0.1-16) unstable; urgency=low * minor cleanups Modified: trunk/scripts-base/miniroot/linuxrc-scripts/debian/changelog =================================================================== --- trunk/scripts-base/miniroot/linuxrc-scripts/debian/changelog 2008-04-15 16:03:27 UTC (rev 2627) +++ trunk/scripts-base/miniroot/linuxrc-scripts/debian/changelog 2008-04-15 16:09:46 UTC (rev 2628) @@ -1,3 +1,9 @@ +morphix-miniroot-linuxrc (0.1-11) unstable; urgency=low + + * Fixes for USB/SCSI booting + + -- Alex de Landgraaf <al...@de...> Tue, 15 Apr 2008 18:06:30 +0200 + morphix-miniroot-linuxrc (0.1-10) unstable; urgency=low * Number of fixes for USB drive booting (From Markus Mandalka) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-05-17 16:19:35
|
Revision: 2631 http://morphix.svn.sourceforge.net/morphix/?rev=2631&view=rev Author: alextreme Date: 2008-05-17 09:17:47 -0700 (Sat, 17 May 2008) Log Message: ----------- * purging XFree86-cruft, autodetection moved to xorg (lets hope this still works) Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/usr/sbin/mkxf86config Added Paths: ----------- trunk/scripts-base/etc/X11/xorg.in Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2008-05-16 09:51:17 UTC (rev 2630) +++ trunk/scripts-base/debian/changelog 2008-05-17 16:17:47 UTC (rev 2631) @@ -1,3 +1,15 @@ +morphix-base-scripts (0.5-70) unstable; urgency=low + + * Removing XFree86-cruft, attempting to see how well xorg autodetects stuff + + -- Alex de Landgraaf <al...@de...> Sat, 17 May 2008 18:16:29 +0200 + +morphix-base-scripts (0.5-69) unstable; urgency=low + + * floppy/cdrom automounting stopped + + -- Alex de Landgraaf <al...@de...> Fri, 16 May 2008 11:51:40 +0200 + morphix-base-scripts (0.5-68) unstable; urgency=low * USB/SCSI fixes Added: trunk/scripts-base/etc/X11/xorg.in =================================================================== --- trunk/scripts-base/etc/X11/xorg.in (rev 0) +++ trunk/scripts-base/etc/X11/xorg.in 2008-05-17 16:17:47 UTC (rev 2631) @@ -0,0 +1,18 @@ +# Rest of the settings should be auto-detected by Xorg +Section "ServerLayout" + Identifier "Default" + Screen "Screen" 0 0 + Option "AllowDeactivateGrabs" "1" + Option "AllowClosedownGrabs" "1" +EndSection +Section "Device" + Identifier "AutodetectDevice" + Driver "@@XMODULE@@" + Option "NoLogo" "1" + Option "DynamicTwinView" "0" + Option "AddARGBGLXVisuals" "1" +EndSection +Section "Screen" + Identifier "Screen" + Device "AutodetectDevice" +EndSection Modified: trunk/scripts-base/usr/sbin/mkxf86config =================================================================== --- trunk/scripts-base/usr/sbin/mkxf86config 2008-05-16 09:51:17 UTC (rev 2630) +++ trunk/scripts-base/usr/sbin/mkxf86config 2008-05-17 16:17:47 UTC (rev 2631) @@ -27,11 +27,6 @@ # BOLD WHITE: Hint WHITE="[1;37m" -TMPFILE="/tmp/mkxf86config-$$" -MONITORTMP="$TMPFILE-monitor" - -rm -f "$TMPFILE" "$MONITORTMP" - ### Utility Function(s) # Reread boot command line; echo last parameter's argument or return false. CMDLINE="$(cat /proc/cmdline)" @@ -52,387 +47,15 @@ # Read in what hwsetup has found for X [ -f /etc/sysconfig/xserver ] && . /etc/sysconfig/xserver -# Xserver, Xmodule, Xscreen, Xvrefresh, if specified by commandline -NEWXSERVER="$(getbootparam xserver 2>/dev/null)" -[ -z "$XSERVER" -a -z "$NEWXSERVER" ] && NEWXSERVER="XFree86" -[ -n "$NEWXSERVER" ] && { XSERVER="$NEWXSERVER" ; echo "XSERVER='$XSERVER'" >> /etc/sysconfig/morphix ; echo "XSERVER='$XSERVER'" >> /etc/sysconfig/xserver; } NEWXMODULE="$(getbootparam xmodule 2>/dev/null)" [ -z "$XMODULE" -a -z "$NEWXMODULE" ] && NEWXMODULE="vesa" [ -n "$NEWXMODULE" ] && { XMODULE="$NEWXMODULE" ; echo "XMODULE='$XMODULE'" >> /etc/sysconfig/morphix ; echo "XMODULE='$XMODULE'" >> /etc/sysconfig/xserver; } -XSCREEN="$(getbootparam xscreen 2>/dev/null)" -[ -z "$XSCREEN" ] && XSCREEN="$(getbootparam screen 2>/dev/null)" -[ -n "$XSCREEN" ] && { echo "XSCREEN='$XSCREEN'" >> /etc/sysconfig/morphix ; echo "XSCREEN='$XSCREEN'" >> /etc/sysconfig/xserver; } -XVREFRESH="$(getbootparam xvrefresh 2>/dev/null)" -[ -n "$XVREFRESH" ] || XVREFRESH="$(getbootparam vrefresh 2>/dev/null)" -[ -n "$XVREFRESH" ] || XVREFRESH="$(getbootparam xvsync 2>/dev/null)" -[ -n "$XVREFRESH" ] || XVREFRESH="$(getbootparam vsync 2>/dev/null)" -[ -n "$XVREFRESH" ] && { echo "XVREFRESH='$XVREFRESH'" >> /etc/sysconfig/morphix ; echo "XVREFRESH='$XVREFRESH'" >> /etc/sysconfig/xserver; } -XHREFRESH="$(getbootparam xhrefresh 2>/dev/null)" -[ -n "$XHREFRESH" ] || XHREFRESH="$(getbootparam hrefresh 2>/dev/null)" -[ -n "$XHREFRESH" ] || XHREFRESH="$(getbootparam xhsync 2>/dev/null)" -[ -n "$XHREFRESH" ] || XHREFRESH="$(getbootparam hsync 2>/dev/null)" -[ -n "$XHREFRESH" ] && { echo "XHREFRESH='$XHREFRESH'" >> /etc/sysconfig/morphix ; echo "XHREFRESH='$XHREFRESH'" >> /etc/sysconfig/xserver; } -XDEPTH="$(getbootparam xdepth 2>/dev/null)" -[ -n "$XDEPTH" ] || XDEPTH="$(getbootparam depth 2>/dev/null)" -[ -n "$XDEPTH" ] && { echo "XDEPTH='$XDEPTH'" >> /etc/sysconfig/morphix ; echo "XDEPTH='$XDEPTH'" >> /etc/sysconfig/xserver; } -# Wheel -WHEEL="" -if checkbootparam "wheel"; then -WHEEL='s|"PS/2"|"IMPS/2"\ -Option "ZAxisMapping" "4 5"|g;' -elif checkbootparam "nowheel"; then -# Don't change the default, which is plain PS/2 -WHEEL="" -else -# Apparently, the mouse auto-protocol option works in XFree 4.3 now. Let's give it a try. -WHEEL='s|"PS/2"|"auto"\ -Option "ZAxisMapping" "4 5"|g;' -fi - # Read in changes [ -f /etc/sysconfig/morphix ] && . /etc/sysconfig/morphix -# Read default keyboard from config file. -# There seems to be no reliable autoprobe possible. -[ -f /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard +sed -e 's|@@XMODULE@@|'"$XMODULE"'|g;' \ + /etc/X11/xorg.in >/etc/X11/xorg.conf -# Create mouse link and insert a mouse default type into XF86Config -# if not already done by hwsetup -[ -f /etc/sysconfig/mouse ] && . /etc/sysconfig/mouse -[ -e /dev/mouse ] || ln -sf /dev/ttyS0 /dev/mouse -# PROTO="${XMOUSETYPE:-Auto}" -PROTO="${XMOUSETYPE:-Microsoft}" -NOEMU="" -[ "${XEMU3}" = "no" ] && NOEMU='s|^.*Emulate3|# No 2 -> 3 Button emulation|g' -DEADKEYS="" -[ "$XKEYBOARD" = "de" ] || DEADKEYS='s|^.*nodeadkeys.*$||g;' -if [ -n "XMODULE" ]; then -# Check for Framebuffer X-Modules and initialize framebuffer module -case "$XMODULE" in -pvr2fb) modprobe "$XMODULE" >/dev/null 2>&1 ; XMODULE="fbdev"; ;; -esac -fi - -NODDC="" -checkbootparam noddc && NODDC="true" - -MONITOR="" -COMPLETE="" -RC="" - -#try to detect monitor -if [ -z "$NODDC" -a -x /usr/bin/get-edid ];then - get-edid 2>/dev/null|parse-edid 2>/dev/null >/etc/sysconfig/monitor - RC="$?" - if [ "$RC" = "0" ];then - sed -i -e 's/Identifier[ \t]*".*"/Identifier "Monitor0"/g' /etc/sysconfig/monitor 2>/dev/null - MONITOR=`cat /etc/sysconfig/monitor` - fi -COMPLETE="$(awk '/EndSection/{print}' <<EOF -$MONITOR -EOF)" -fi - - -if [ -z "$NODDC" -a -z "$MONITOR" ]; then -# Try to get Monitor data via ddcxinfo-knoppix -MONITOR="$(ddcxinfo-knoppix -monitor)" -RC="$?" -COMPLETE="$(awk '/EndSection/{print}' <<EOF -$MONITOR -EOF)" -fi - -if [ "$RC" != "0" -o -z "$MONITOR" -o -z "$COMPLETE" ]; then -MONITOR=' -Section "Monitor" - Identifier "Monitor0" - ModelName "Old Monitor (no DDC)" -# HorizSync 28.0 - 78.0 # Warning: This may fry very old Monitors - HorizSync 28.0 - 96.0 # Warning: This may fry old Monitors -# VertRefresh 50.0 - 76.0 # Very conservative. May flicker. - VertRefresh 50.0 - 60.0 # Extreme conservative. Will flicker. TFT default. - - # Default modes distilled from - # "VESA and Industry Standards and Guide for Computer Display Monitor - # Timing", version 1.0, revision 0.8, adopted September 17, 1998. - # $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.4 1999/11/18 16:52:17 tsi Exp $ - # 640x350 @ 85Hz (VESA) hsync: 37.9kHz - ModeLine "640x350" 31.5 640 672 736 832 350 382 385 445 +hsync -vsync - # 640x400 @ 85Hz (VESA) hsync: 37.9kHz - ModeLine "640x400" 31.5 640 672 736 832 400 401 404 445 -hsync +vsync - # 720x400 @ 85Hz (VESA) hsync: 37.9kHz - ModeLine "720x400" 35.5 720 756 828 936 400 401 404 446 -hsync +vsync - # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz - ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync - # 640x480 @ 72Hz (VESA) hsync: 37.9kHz - ModeLine "640x480" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync - # 640x480 @ 75Hz (VESA) hsync: 37.5kHz - ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync - # 640x480 @ 85Hz (VESA) hsync: 43.3kHz - ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync - # 800x600 @ 56Hz (VESA) hsync: 35.2kHz - ModeLine "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync - # 800x600 @ 60Hz (VESA) hsync: 37.9kHz - ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync - # 800x600 @ 72Hz (VESA) hsync: 48.1kHz - ModeLine "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync - # 800x600 @ 75Hz (VESA) hsync: 46.9kHz - ModeLine "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync - # 800x600 @ 85Hz (VESA) hsync: 53.7kHz - ModeLine "800x600" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync - # 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz - ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace - # 1024x768 @ 60Hz (VESA) hsync: 48.4kHz - ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync - # 1024x768 @ 70Hz (VESA) hsync: 56.5kHz - ModeLine "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync - # 1024x768 @ 75Hz (VESA) hsync: 60.0kHz - ModeLine "1024x768" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync - # 1024x768 @ 85Hz (VESA) hsync: 68.7kHz - ModeLine "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync - # 1152x864 @ 75Hz (VESA) hsync: 67.5kHz - ModeLine "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync - # 1280x960 @ 60Hz (VESA) hsync: 60.0kHz - ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync - # 1280x960 @ 85Hz (VESA) hsync: 85.9kHz - ModeLine "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync - # 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz - ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync - # 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz - ModeLine "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync - # 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz - ModeLine "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync - # 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz - ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync - # 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz - ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync - # 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz - ModeLine "1600x1200" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync - # 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz - ModeLine "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync - # 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz - ModeLine "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync - # 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz - ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync - # 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz - ModeLine "1792x1344" 261.0 1792 1888 2104 2456 1344 1345 1348 1417 -hsync +vsync - # 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz - ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync - # 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz - ModeLine "1856x1392" 288.0 1856 1984 2208 2560 1392 1393 1396 1500 -hsync +vsync - # 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz - ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync - # 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz - ModeLine "1920x1440" 297.0 1920 2064 2288 2640 1440 1441 1444 1500 -hsync +vsync - # Additional modelines - ModeLine "1800x1440" 230 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync - ModeLine "1800x1440" 250 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync - # Extended modelines with GTF timings - # 640x480 @ 100.00 Hz (GTF) hsync: 50.90 kHz; pclk: 43.16 MHz - ModeLine "640x480" 43.16 640 680 744 848 480 481 484 509 -HSync +Vsync - # 768x576 @ 60.00 Hz (GTF) hsync: 35.82 kHz; pclk: 34.96 MHz - ModeLine "768x576" 34.96 768 792 872 976 576 577 580 597 -HSync +Vsync - # 768x576 @ 72.00 Hz (GTF) hsync: 43.27 kHz; pclk: 42.93 MHz - ModeLine "768x576" 42.93 768 800 880 992 576 577 580 601 -HSync +Vsync - # 768x576 @ 75.00 Hz (GTF) hsync: 45.15 kHz; pclk: 45.51 MHz - ModeLine "768x576" 45.51 768 808 888 1008 576 577 580 602 -HSync +Vsync - # 768x576 @ 85.00 Hz (GTF) hsync: 51.42 kHz; pclk: 51.84 MHz - ModeLine "768x576" 51.84 768 808 888 1008 576 577 580 605 -HSync +Vsync - # 768x576 @ 100.00 Hz (GTF) hsync: 61.10 kHz; pclk: 62.57 MHz - ModeLine "768x576" 62.57 768 816 896 1024 576 577 580 611 -HSync +Vsync - # 800x600 @ 100.00 Hz (GTF) hsync: 63.60 kHz; pclk: 68.18 MHz - ModeLine "800x600" 68.18 800 848 936 1072 600 601 604 636 -HSync +Vsync - # 1024x768 @ 100.00 Hz (GTF) hsync: 81.40 kHz; pclk: 113.31 MHz - ModeLine "1024x768" 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync - # 1152x864 @ 60.00 Hz (GTF) hsync: 53.70 kHz; pclk: 81.62 MHz - ModeLine "1152x864" 81.62 1152 1216 1336 1520 864 865 868 895 -HSync +Vsync - # 1152x864 @ 85.00 Hz (GTF) hsync: 77.10 kHz; pclk: 119.65 MHz - ModeLine "1152x864" 119.65 1152 1224 1352 1552 864 865 868 907 -HSync +Vsync - # 1152x864 @ 100.00 Hz (GTF) hsync: 91.50 kHz; pclk: 143.47 MHz - ModeLine "1152x864" 143.47 1152 1232 1360 1568 864 865 868 915 -HSync +Vsync - # 1280x960 @ 72.00 Hz (GTF) hsync: 72.07 kHz; pclk: 124.54 MHz - ModeLine "1280x960" 124.54 1280 1368 1504 1728 960 961 964 1001 -HSync +Vsync - # 1280x960 @ 75.00 Hz (GTF) hsync: 75.15 kHz; pclk: 129.86 MHz - ModeLine "1280x960" 129.86 1280 1368 1504 1728 960 961 964 1002 -HSync +Vsync - # 1280x960 @ 100.00 Hz (GTF) hsync: 101.70 kHz; pclk: 178.99 MHz - ModeLine "1280x960" 178.99 1280 1376 1520 1760 960 961 964 1017 -HSync +Vsync - # 1280x1024 @ 100.00 Hz (GTF) hsync: 108.50 kHz; pclk: 190.96 MHz - ModeLine "1280x1024" 190.96 1280 1376 1520 1760 1024 1025 1028 1085 -HSync +Vsync - # 1400x1050 @ 60.00 Hz (GTF) hsync: 65.22 kHz; pclk: 122.61 MHz - ModeLine "1400x1050" 122.61 1400 1488 1640 1880 1050 1051 1054 1087 -HSync +Vsync - # 1400x1050 @ 72.00 Hz (GTF) hsync: 78.77 kHz; pclk: 149.34 MHz - ModeLine "1400x1050" 149.34 1400 1496 1648 1896 1050 1051 1054 1094 -HSync +Vsync - # 1400x1050 @ 75.00 Hz (GTF) hsync: 82.20 kHz; pclk: 155.85 MHz - ModeLine "1400x1050" 155.85 1400 1496 1648 1896 1050 1051 1054 1096 -HSync +Vsync - # 1400x1050 @ 85.00 Hz (GTF) hsync: 93.76 kHz; pclk: 179.26 MHz - ModeLine "1400x1050" 179.26 1400 1504 1656 1912 1050 1051 1054 1103 -HSync +Vsync - # 1400x1050 @ 100.00 Hz (GTF) hsync: 111.20 kHz; pclk: 214.39 MHz - ModeLine "1400x1050" 214.39 1400 1512 1664 1928 1050 1051 1054 1112 -HSync +Vsync - # 1600x1200 @ 100.00 Hz (GTF) hsync: 127.10 kHz; pclk: 280.64 MHz - ModeLine "1600x1200" 280.64 1600 1728 1904 2208 1200 1201 1204 1271 -HSync +Vsync -EndSection -' -fi - -# Extract values for display -MODEL="$(awk '/^[ ]*ModelName/{print;exit}'<<EOF -$MONITOR -EOF -)" - -MODEL="${MODEL#*\"}" -MODEL="${MODEL%\"*}" - -HREFRESH="$(awk '/^[ ]*HorizSync/{print $2 $3 $4; exit}'<<EOF -$MONITOR -EOF -)" - -VREFRESH="$(awk '/^[ ]*VertRefresh/{print $2 $3 $4; exit}'<<EOF -$MONITOR -EOF -)" - -# Build line of allowed modes -MODES="" -ADDMODE="" -# Use commandline modes if specified -[ -n "$XSCREEN" ] && ADDMODE="-firstmode $XSCREEN" -if [ -z "$XSCREEN" -a -f /etc/sysconfig/monitor ];then - XSCREEN=`grep -e "Mode .*\"" /etc/sysconfig/monitor|grep -o -e "\"[0-9x\"]*"|sed -e 's/"//g'` - ADDMODE="-firstmode $XSCREEN" -fi -if [ -z "$NODDC" ]; then -MODES="$(ddcxinfo-knoppix -modes $ADDMODE)" -fi -if [ "$?" != "0" -o -z "$MODES" ]; then -MODES="Modes " -[ -n "$XSCREEN" ] && MODES="$MODES \"$XSCREEN\"" -MODES="$MODES \"1024x768\" \"800x600\" \"640x480\"" -fi - -# Use commandline vertical refresh rate if specified -if [ -n "$XVREFRESH" ]; then -MONITOR="$(sed 's|VertRefresh[ ].*$|VertRefresh 49.0 - '"$XVREFRESH"'|g;' <<EOF -$MONITOR -EOF -)" -fi - -# Use commandline horizontal refresh rate if specified -if [ -n "$XHREFRESH" ]; then -MONITOR="$(sed 's|HorizSync[ ].*$|HorizSync 28.0 - '"$XHREFRESH"'|g;' <<EOF -$MONITOR -EOF -)" -fi - -DEPTH="" -# Use commandline colordepth if specified -if [ -n "$XDEPTH" ]; then -DEPTH='s|DefaultColorDepth[ ].*$|DefaultColorDepth '"$XDEPTH"'|g;' -fi - -# We need to check this because serial mice have long timeouts -SERIALMOUSE="$(ls -l1 /dev/mouse* 2>/dev/null | awk '/ttyS/{print $NF ; exit 0}')" -if [ -n "$SERIALMOUSE" ]; then -SERIALMOUSE="s|/dev/ttyS0|$SERIALMOUSE|g;" -else -SERIALMOUSE='s|^.*InputDevice.*"Serial Mouse".*$|# Serial Mouse not detected|g;' -fi - -# PS/2 bug: Some keyboards are incorrectly used as mice in XFree. :-( -PSMOUSE="$(ls -l1 /dev/mouse* 2>/dev/null | awk '/psaux/{print $NF ; exit 0}')" -if [ -n "$PSMOUSE" ]; then -PSMOUSE="" -else -PSMOUSE='s|^.*InputDevice.*"PS/2 Mouse".*$|# PS/2 Mouse not detected|g;' -fi - -#case "$(cat /proc/modules)" in *usbmouse*|*mousedev*|*hid*) -USBMOUSE="" -#*) -#USBMOUSE='s|^.*InputDevice.*"USB Mouse".*$|# USB Mouse not detected|g;';; -#esac - -# Write Monitor data now -rm -f "$MONITORTMP" -echo "$MONITOR" >"$MONITORTMP" - -# /etc/X11/XF86Config* is the "default" config. -if [ ! -f /etc/XF86Config -a ! -f /etc/X11/XF86Config ]; then -# Remove it, just in case it's a link to CD -rm -f /etc/XF86Config /etc/X11/XF86Config 2>/dev/null -sed -e 's|@@PROTOCOL@@|'"$PROTO"'|g;'"$NOEMU" \ - -e '/@@MONITOR@@/r '"$MONITORTMP" \ - -e 's|@@MONITOR@@||g' \ - -e 's|@@MODES@@|'"$MODES"'|g;'"$DEPTH" \ - -e 's|XkbLayout *"[^"]*"|XkbLayout "'"$XKEYBOARD"'"|g;'"$DEADKEYS" \ - /etc/X11/XF86Config.in > /etc/X11/XF86Config -fi - -if [ ! -f /etc/XF86Config-4 -a ! -f /etc/X11/XF86Config-4 ]; then -rm -f /etc/XF86Config-4 /etc/X11/XF86Config-4 2>/dev/null - -# Kernel 2.6 reports psaux via /dev/input/mice like USB -case "$KVER" in 2.6.*) - if [ -z "$PSMOUSE" -a -z "$USBMOUSE" ]; then - PSMOUSE='s|^.*InputDevice.*"PS/2 Mouse".*$|# PS/2 Mouse using /dev/input/mice in Kernel 2.6|g;' - USBMOUSE="" - fi - ;; -esac - -# VMWare special handling -VMWARE="" -if [ "$XMODULE" = "vmware" ]; then -VMWARE='s|^.*BusID.*PCI.*$|BusID "PCI:0:15:0"|g;' -DEPTH='s|DefaultColorDepth |# DefaultColorDepth |g;' -fi - -if [ "$XMODULE" = "fbdev" ]; then - DEPTH='s|DefaultColorDepth |# DefaultColorDepth |g;' -fi - - -# These drivers need the sw_cursor option -SWCURSOR="" -case "$XMODULE" in ati|trident) SWCURSOR='s|^.*#Option.*"sw_cursor".*$|Option "sw_cursor"|g;';; esac - -# We must use NoPM, because some machines freeze if Power management is being activated. - -NOPM="" -DPMS="" -checkbootparam noapm && NOPM='Option "NoPM" "true"' || DPMS='Option "DPMS" "true"' - -sed -e 's|@@PROTOCOL@@|'"$PROTO"'|g;'"$NOEMU" \ - -e '/@@MONITOR@@/r '"$MONITORTMP" \ - -e 's|@@MONITOR@@||g' \ - -e 's|@@NOPM@@|'"$NOPM"'|g' \ - -e 's|@@XMODULE@@|'"$XMODULE"'|g;'"$VMWARE""$SERIALMOUSE""$USBMOUSE""$PSMOUSE""$SWCURSOR""$WHEEL" \ - -e 's|@@MODES@@|'"$MODES"'|g;'"$DEPTH" \ - -e 's|"XkbLayout" *"[^"]*"|"XkbLayout" "'"$XKEYBOARD"'"|g;'"$DEADKEYS" \ - /etc/X11/XF86Config-4.in >/etc/X11/XF86Config-4 - -if [ -n "$DPMS" ]; then -sed -e 's|Identifier[ ]*"Monitor0"|Identifier "Monitor0"\ - '"$DPMS"'|g' /etc/X11/XF86Config-4 >/etc/X11/XF86Config-4.new -mv -f /etc/X11/XF86Config-4.new /etc/X11/XF86Config-4 -fi - -fi - -rm -f "$TMPFILE" "$MONITORTMP" 2>/dev/null - # Print info about selected X-Server -[ -n "$XDESC" ] || XDESC="(yet) unknown card" -echo -n " ${GREEN}* Video is" -[ -n "$XDESC" ] && echo -n " ${YELLOW}$XDESC${GREEN}," -echo -n " using ${YELLOW}${XSERVER:-generic VESA}" -[ -n "$XMODULE" ] && echo -n "(${MAGENTA}$XMODULE${YELLOW})" -echo " Server${NORMAL}" -echo -n " ${GREEN}* Monitor is ${YELLOW}${MODEL:-Generic Monitor}${NORMAL}" -[ -n "$HREFRESH" -a -n "$VREFRESH" ] && echo "${GREEN}, ${GREEN}H:${YELLOW}${HREFRESH}kHz${GREEN}, V:${YELLOW}${VREFRESH}Hz${NORMAL}" || echo "" -[ -n "$XVREFRESH" ] && echo " ${GREEN}* Trying specified vrefresh rate of ${YELLOW}${XVREFRESH}Hz.${NORMAL}" -[ -n "$MODES" ] && echo " ${GREEN}* Using Modes ${YELLOW}${MODES##Modes }${NORMAL}" +echo -n " ${GREEN}* Video:" +echo -n " using Xorg, driver (${MAGENTA}$XMODULE${YELLOW})" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ale...@us...> - 2008-06-20 13:56:08
|
Revision: 2636 http://morphix.svn.sourceforge.net/morphix/?rev=2636&view=rev Author: alextreme Date: 2008-06-20 06:54:41 -0700 (Fri, 20 Jun 2008) Log Message: ----------- * Yes I'm enjoying this. Why do you ask? Modified Paths: -------------- trunk/scripts-base/debian/changelog trunk/scripts-base/etc/init.d/morphix-start Modified: trunk/scripts-base/debian/changelog =================================================================== --- trunk/scripts-base/debian/changelog 2008-06-20 09:10:31 UTC (rev 2635) +++ trunk/scripts-base/debian/changelog 2008-06-20 13:54:41 UTC (rev 2636) @@ -1,3 +1,9 @@ +morphix-base-scripts (0.5-74) unstable; urgency=low + + * Another attempt + + -- Alex de Landgraaf <al...@de...> Fri, 20 Jun 2008 15:53:54 +0200 + morphix-base-scripts (0.5-73) unstable; urgency=low * Fixing minimodules (iso not appearing in /media/cdrom) Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2008-06-20 09:10:31 UTC (rev 2635) +++ trunk/scripts-base/etc/init.d/morphix-start 2008-06-20 13:54:41 UTC (rev 2636) @@ -295,6 +295,7 @@ # Mount all filesystems chroot /mnt/main mount -a -F +chroot /mnt/main mount /media/cdrom # network stuff cp -af /etc/network/* /mnt/main/etc/network/ >/dev/null 2>&1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |