From: <ale...@us...> - 2004-01-05 01:16:23
|
Update of /cvsroot/morphix/scripts-base/etc/init.d In directory sc8-pr-cvs1:/tmp/cvs-serv12470 Modified Files: knoppix-autoconfig morphix-start Log Message: 0.4-1b changes Index: knoppix-autoconfig =================================================================== RCS file: /cvsroot/morphix/scripts-base/etc/init.d/knoppix-autoconfig,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** knoppix-autoconfig 6 Dec 2003 22:30:50 -0000 1.16 --- knoppix-autoconfig 4 Jan 2004 23:22:09 -0000 1.17 *************** *** 50,60 **** } ! case "$CMDLINE" in *splash*) SPLASH="yes"; ;; esac # Bootsplash section if test -n "$SPLASH"; then ! #rc_splash "fsck start" ! echo "show 4000">/proc/splash fi --- 50,64 ---- } ! case "$CMDLINE" in ! *splash*) ! if [ -e "/proc/splash" ]; then ! SPLASH="yes"; ! fi ! ;; esac # Bootsplash section if test -n "$SPLASH"; then ! echo "show 4000">/proc/splash 2>/dev/null fi *************** *** 471,476 **** if test -n "$SPLASH"; then ! #rc_splash2 8000 ! echo "show 8000">/proc/splash fi --- 475,479 ---- if test -n "$SPLASH"; then ! echo "show 8000">/proc/splash 2>/dev/null fi *************** *** 573,578 **** if test -n "$SPLASH"; then ! #rc_splash2 12000 ! echo "show 12000">/proc/splash fi --- 576,580 ---- if test -n "$SPLASH"; then ! echo "show 12000">/proc/splash 2>/dev/null fi *************** *** 672,677 **** if test -n "$SPLASH"; then ! #rc_splash2 16000 >/dev/null 2>&1 ! echo "show 16000">/proc/splash fi --- 674,678 ---- if test -n "$SPLASH"; then ! echo "show 16000">/proc/splash 2>/dev/null fi *************** *** 734,739 **** if test -n "$SPLASH"; then ! #rc_splash2 20000 ! echo "show 20000">/proc/splash fi --- 735,739 ---- if test -n "$SPLASH"; then ! echo "show 20000">/proc/splash 2>/dev/null fi *************** *** 799,804 **** if test -n "$SPLASH"; then ! #rc_splash2 24000 ! echo "show 24000">/proc/splash fi --- 799,803 ---- if test -n "$SPLASH"; then ! echo "show 24000">/proc/splash 2>/dev/null fi *************** *** 874,879 **** if test -n "$SPLASH"; then ! echo "show 28000">/proc/splash ! #rc_splash2 28000 fi --- 873,877 ---- if test -n "$SPLASH"; then ! echo "show 28000">/proc/splash 2>/dev/null fi *************** *** 891,895 **** # Start creating /etc/fstab with HD partitions and USB SCSI devices now echo -n "${BLUE}Scanning for Harddisk partitions and creating ${YELLOW}/etc/fstab${BLUE}... " ! rebuildfstab -r >/dev/null 2>&1 if [ -e /var/run/rebuildfstab.pid ]; then # Another instance of rebuildfstab, probably from hotplug, is still running, so just wait. --- 889,897 ---- # Start creating /etc/fstab with HD partitions and USB SCSI devices now echo -n "${BLUE}Scanning for Harddisk partitions and creating ${YELLOW}/etc/fstab${BLUE}... " ! USERNAME="$(getbootparam username)" ! if [ -z $USERNAME ]; then ! USERNAME="morph" ! fi ! rebuildfstab -r -u $USERNAME >/dev/null 2>&1 if [ -e /var/run/rebuildfstab.pid ]; then # Another instance of rebuildfstab, probably from hotplug, is still running, so just wait. *************** *** 937,942 **** if test -n "$SPLASH"; then ! echo "show 32000">/proc/splash ! #rc_splash2 32000 fi --- 939,943 ---- if test -n "$SPLASH"; then ! echo "show 32000">/proc/splash 2>/dev/null fi Index: morphix-start =================================================================== RCS file: /cvsroot/morphix/scripts-base/etc/init.d/morphix-start,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** morphix-start 6 Dec 2003 22:30:50 -0000 1.20 --- morphix-start 4 Jan 2004 23:22:09 -0000 1.21 *************** *** 21,29 **** [ -f /etc/sysconfig/knoppix ] && . /etc/sysconfig/knoppix CMDLINE="$(cat /proc/cmdline)" - case "$CMDLINE" in *splash*) SPLASH="yes"; ;; esac num=$((200)) --- 21,34 ---- [ -f /etc/sysconfig/knoppix ] && . /etc/sysconfig/knoppix + [ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n CMDLINE="$(cat /proc/cmdline)" case "$CMDLINE" in *splash*) SPLASH="yes"; ;; esac + USERNAME="$(getbootparam username)" + if [ -z $USERNAME ]; then + USERNAME="morph" + fi + num=$((200)) *************** *** 94,100 **** return 1 } if test -n "$SPLASH"; then ! # rc_splash ! echo "show 44000">/proc/splash 2>/dev/null fi # MainModule loading section --- 99,107 ---- return 1 } + if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then ! echo "show 44000">/proc/splash 2>/dev/null ! fi fi # MainModule loading section *************** *** 104,107 **** --- 111,119 ---- echo "Loading Module $1" + USERNAME="$(getbootparam username)" + if [ -z $USERNAME ]; then + USERNAME="morph" + fi + # Load Module *************** *** 154,160 **** fi if test -n "$SPLASH"; then ! # rc_splash echo "show 48000">/proc/splash 2>/dev/null ! fi --- 166,172 ---- fi if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then echo "show 48000">/proc/splash 2>/dev/null ! fi fi *************** *** 184,199 **** if [ -f "$MYHOMEDIR" ]; then # It's a loopback file, mount it over the /home/morph directory ! mkdir /home/morph ! trymount "$MYHOMEDIR" /home/morph RC="$?" ! [ "$RC" = "0" ] && ERROR="$(mount -o remount,rw /home/morph 2>&1)" RC="$?" else # Do a --bind mount ! ERROR="$(mount --bind "$MYHOMEDIR" /home/morph 2>&1)" RC="$?" fi ! mount --bind /home/morph /mnt/main/home/morph ! [ "$RC" = "0" ] && echo "${GREEN}/home/morph mounted OK.${NORMAL}" || { echo "${RED}FAILED."; echo "$ERROR${NORMAL}"; } fi break --- 196,211 ---- if [ -f "$MYHOMEDIR" ]; then # It's a loopback file, mount it over the /home/morph directory ! mkdir /home/$USERNAME ! trymount "$MYHOMEDIR" /home/$USERNAME RC="$?" ! [ "$RC" = "0" ] && ERROR="$(mount -o remount,rw /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" ] && echo "${GREEN}/home/$USERNAME mounted OK.${NORMAL}" || { echo "${RED}FAILED."; echo "$ERROR${NORMAL}"; } fi break *************** *** 209,213 **** # /home dir's, check permissions... ! chown morph.users /home/morph # /dev files, should be a better way than this --- 221,225 ---- # /home dir's, check permissions... ! chown $USERNAME.users /home/$USERNAME # /dev files, should be a better way than this *************** *** 217,261 **** mount --bind /MorphixCD /mnt/main/MorphixCD - # /var files, copy all to ramdisk, except for /var/lib - # that is binded directly (saves precious ram) - # same problem as with /etc - # - # Using translucency for this now - - #mkdir /ramdisk/mainvar 2> /dev/null - #mkdir /ramdisk/mainvar/lib 2> /dev/null - #mount --rbind /mnt/main/var/lib /ramdisk/mainvar/lib - - #src=$(ls /mnt/main/var | grep '[^lib]') - #for i in $src; - #do - #cp -a /mnt/main/var/$i /ramdisk/mainvar - #done; - - #mount --rbind /ramdisk/mainvar /mnt/main/var - if test -n "$SPLASH"; then ! $rc_splash ! echo "show 52000">/proc/splash ! fi - # /etc files, copy all to ramdisk, except for gconf - # this is ofcourse a compromise, make sure /etc is small! - # - # Now using translucency instead - - #mkdir /ramdisk/mainetc 2> /dev/null - #mkdir /ramdisk/mainetc/gconf 2> /dev/null - #mkdir /ramdisk/mainetc/skel 2> /dev/null - #mount --rbind /mnt/main/etc/gconf /ramdisk/mainetc/gconf - #mount --rbind /mnt/main/etc/skel /ramdisk/mainetc/skel - #src=$(ls /mnt/main/etc | grep '[^gconf]' | grep '[^skel]') - #for i in $src; - #do - #cp -a /mnt/main/etc/$i /ramdisk/mainetc - #done; - #mount --rbind /ramdisk/mainetc /mnt/main/etc - # Translucency BLOCKTRANS="$(getbootparam blocktrans)" --- 229,238 ---- mount --bind /MorphixCD /mnt/main/MorphixCD if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then ! echo "show 52000">/proc/splash ! fi fi # Translucency BLOCKTRANS="$(getbootparam blocktrans)" *************** *** 307,312 **** if test -n "$SPLASH"; then ! # rc_splash2 44000 ! echo "show 56000">/proc/splash fi --- 284,290 ---- if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then ! echo "show 56000">/proc/splash ! fi fi *************** *** 315,332 **** mkdir /mnt/main/etc/sysconfig 2> /dev/null - # *rolls eyes* - #AUTOMOUNTER="yes" - #if [ -n "$AUTOMOUNTER" ]; then - # Check for floppy dir, reinstall with automounter - # [ -d /mnt/floppy -a ! -L /mnt/floppy ] && rmdir /mnt/floppy - # [ -d /mnt/auto/floppy ] || mkdir -p /mnt/auto/floppy - # [ -L /mnt/floppy ] || ln -s /mnt/auto/floppy /mnt/floppy - # [ -d /mnt/cdrom -a ! -L /mnt/cdrom ] && rmdir /mnt/cdrom - # [ -d /mnt/auto/cdrom ] || mkdir -p /mnt/auto/cdrom - # [ -L /mnt/cdrom ] || ln -s /mnt/auto/cdrom /mnt/cdrom - # rm -f /etc/fstab.new - mkdir /mnt/main/cdrom >/dev/null 2>&1 - #mkdir /mnt/main/cdrom0 # Replace paths from bootfloppy using supermount --- 293,297 ---- *************** *** 342,346 **** mount --bind /cdrom /mnt/main/cdrom - # lots of stuff, might have to check which are _really_ necessary # but for now it should work reasonably well... --- 307,310 ---- *************** *** 354,360 **** cp -af /MorphixCD/etc/inputrc /mnt/main/etc/inputrc cp -af /MorphixCD/etc/pcmcia /mnt/main/etc/ >/dev/null 2>&1 - #cp -af /etc/passwd /mnt/main/etc/passwd # morph is now created otf... - #cp -af /etc/shadow /mnt/main/etc/shadow - #cp -af /etc/group /mnt/main/etc/group cp -af /MorphixCD/etc/localtime /mnt/main/etc/localtime >/dev/null 2>&1 cp -af /etc/filesystems /mnt/main/etc/filesystems --- 318,321 ---- *************** *** 366,369 **** --- 327,336 ---- cp -af /etc/sysconfig/* /mnt/main/etc/sysconfig/ + # lets set up our /etc/environment + + echo "LANG=$LANG" > /mnt/main/etc/environment + echo "COUNTRY=$COUNTRY" >> /mnt/main/etc/environment + echo "LANGUAGE=$LANGUAGE" >> /mnt/main/etc/environment + # and some scripts we want in our mainmod... *************** *** 381,402 **** if test -n "$SPLASH"; then ! # rc_splash2 5000 ! echo "show 60000">/proc/splash 2>/dev/null ! fi HOMEDIR="$(getbootparam home)" if [ -z "$HOMEDIR" ]; then ! rmdir /mnt/main/home/morph ! chroot /mnt/main useradd -m morph ! chroot /mnt/main usermod -G dialout,fax,voice,dip,cdrom,floppy,tape,sudo,audio,video,games,users -U morph ! # cp -a /mnt/main/etc/skel /mnt/main/home/morph ! # chown -R morph.morph /mnt/main/home/morph else ! chroot /mnt/main useradd morph ! chroot /mnt/main chown -R morph /home/morph ! chroot /mnt/main usermod -G dialout,fax,voice,dip,cdrom,floppy,tape,sudo,audio,video,games,users -U morph fi #cardmgr section --- 348,380 ---- if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then ! echo "show 60000">/proc/splash 2>/dev/null ! fi fi HOMEDIR="$(getbootparam home)" if [ -z "$HOMEDIR" ]; then ! rmdir /mnt/main/home/$USERNAME ! chroot /mnt/main useradd -m $USERNAME else ! chroot /mnt/main useradd $USERNAME ! chroot /mnt/main chown -R $USERNAME /home/$USERNAME fi + # wish this could be neater, but if one group fails they otherwise all would + chroot /mnt/main usermod -G dialout $USERNAME + chroot /mnt/main usermod -G fax $USERNAME + chroot /mnt/main usermod -G voice $USERNAME + chroot /mnt/main usermod -G dip $USERNAME + chroot /mnt/main usermod -G cdrom $USERNAME + chroot /mnt/main usermod -G floppy $USERNAME + chroot /mnt/main usermod -G tape $USERNAME + chroot /mnt/main usermod -G sudo $USERNAME + chroot /mnt/main usermod -G audio $USERNAME + chroot /mnt/main usermod -G video $USERNAME + chroot /mnt/main usermod -G games $USERNAME + chroot /mnt/main usermod -G users $USERNAME + chroot /mnt/main usermod -U $USERNAME + #cardmgr section *************** *** 449,454 **** if test -n "$SPLASH"; then ! # rc_splash2 58000 ! echo "show 6400">/proc/splash 2>/dev/null fi --- 427,433 ---- if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then ! echo "show 6400">/proc/splash 2>/dev/null ! fi fi *************** *** 491,495 **** if test -n "$SPLASH"; then ! echo "show 66000">/proc/splash 2>/dev/null fi --- 470,476 ---- if test -n "$SPLASH"; then ! if [ -e /proc/splash ]; then ! echo "show 66000">/proc/splash 2>/dev/null ! fi fi *************** *** 518,521 **** --- 499,503 ---- if [ $COPY -gt 0 ]; then chroot /mnt/main cp -a /cdrom/copy/* / + chroot /mnt/main chown -R $USERNAME /home/$USERNAME fi *************** *** 540,543 **** --- 522,527 ---- # end single-module section } + + # ruthlessly copied from the myhomedir section |