diff options
author | Dirk von Suchodoletz | 2006-03-08 20:16:36 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-03-08 20:16:36 +0100 |
commit | 8bd96400a49762c9c8aae0d2cccd53ae129c827a (patch) | |
tree | db080e5062632254416222c49cce2a08617e3ed0 /initrd/initrd-stuff/bin | |
parent | started integration of vmware services ... (diff) | |
download | core-8bd96400a49762c9c8aae0d2cccd53ae129c827a.tar.gz core-8bd96400a49762c9c8aae0d2cccd53ae129c827a.tar.xz core-8bd96400a49762c9c8aae0d2cccd53ae129c827a.zip |
added hard disk detection, swap and special partition "44", started with
new vmware environment integration ...
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@96 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin')
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 34 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 25 |
2 files changed, 34 insertions, 25 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index ada09a31..bf82c2c2 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -403,19 +403,14 @@ if [ -n "$IDE" ] ; then # you might want to check /etc/sysconfig/floppy for more info strinfile "ZIP" /tmp/hwsetup.info && modprobe ${MODPRV} ide_floppy strinfile "CDROM" /tmp/hwsetup.info && modprobe ${MODPRV} ide_cd - strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk & + strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk fi # not rather precise ... if strinfile "SCSI" /tmp/hwsetup.info ; then strinfile "CDROM" /tmp/hwsetup.info && modprobe -a ${MODPRV} sr_mod sg - strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} sd_mod & + strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} sd_mod fi - -# cdrom/dvd und plattenkonfig. ergaenzen. Module sind hier geladen und -# devices sind klar - - # fixme - psmouse entladen, falls nicht vorhanden # configure some variables from configuration file - wait for dhcp or ldap @@ -427,6 +422,29 @@ data via ldap until now ..." nonfatal . /etc/machine-setup # wait for completion of clients root filesystem in /mnt waitfor /tmp/fscmpl 40000 + +# postpone some commands into normal bootup environment +echo -e "\t# entry added by $0: $date" \ + >>/mnt/etc/${D_INITDIR}/boot.ld +# cdrom/dvd und plattenkonfig. ergaenzen. Module sind hier geladen und +# devices sind klar +for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ + sed -n -e '/device:/p' | sed -e 's/device: //') ; do + fdisk -l /dev/$hd| sed -n "/^\/dev\//p" > /tmp/hd_part + for hdpartnr in $(cat /tmp/hd_part | \ + sed -n -e "/ 82 /p"|sed -e "s/[[:space:]].*//") ; do + echo -e "$hdpartnr\tswap\t\tswap\t\tdefaults\t0 0" >> /mnt/etc/fstab + done + # we use special non assigned partition type for harddisk scratch space + for hdpartnr in $(cat /tmp/hd_part | \ + sed -n -e "/ 44 /p"|sed -e "s/[[:space:]].*//") ; do + echo -e "\t( mke2fs -q $hdpartnr; mount -n $hdpartnr /mnt/tmp ) &" \ + >>/mnt/etc/${D_INITDIR}/boot.ld + # + break + done +done + # run localizator and configure keyboard and console fonts DEFKEYTABLE="de-latin1-nodeadkeys" localization $country @@ -435,8 +453,6 @@ if [ -z "${KEYTABLE}" ] ; then '${DEFKEYTABLE}' defined\nin $0." KEYTABLE=${DEFKEYTABLE} fi -echo -e "\t# entry added by $0: $date" \ - >>/mnt/etc/${D_INITDIR}/boot.ld echo -e "\tloadkeys -q ${KEYTABLE}\n" >>/mnt/etc/${D_INITDIR}/boot.ld [ -n "${CONSOLE_FONT}" ] && consolefont # run X11 / Xorg configurator diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index ce1543ba..a6ce3793 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -194,7 +194,7 @@ if [ "x$start_x" != "xno" ] ; then chmod a+rwxt /mnt/tmp/.X11-unix echo "" > /mnt/etc/X11/xdm/Xservers # define additional sessions offered to the user (via dhcp/ldap config) - descsession + # descsession -> deprecated by new vmware integration concept # write available X display manager to /etc/X11/xdm/Xaccess [ -n "$x_display_manager" ] && \ echo -e "# /etc/X11/xdm/Xaccess - file generated by $0: \ @@ -307,7 +307,7 @@ if [ "x$nis_domain" != "x" ] && [ "x$nis_servers" != "x" ] ; then echo -e "# /etc/yp.conf - file generated by $0:\n\ #\t$date\n\nypserver "$nis_servers >/mnt/etc/yp.conf # should be last in passwd file - strinfile "+::::::" /mnt/etc/passwd || echo "+::::::" >>/mnt/etc/passwd + strinfile "+::::::" /mnt/etc/passwd||echo "+::::::" >>/mnt/etc/passwd fi ####################################################################### @@ -321,20 +321,13 @@ config_nscd # create needed directories and files if [ "x$vmware" != "x" ] || [ "x$vmware" != "xno" ] ; then -for i in /var/lib/vmware /etc/vmware/vmnet1 /etc/vmware/vmnet8 \ - /var/run/vmware ; do - testmkd /mnt/$i -done -chmod 1777 /mnt/var/run/vmware -rm /mnt/etc/vmware/not_configured -# device creation might not be needed any longer!? -for i in 0 1 2 3 4 5 6 7 8 9; do - [ -c /mnt/dev/vmnet$i ] || mknod /dev/vmnet$i c 119 $i -done -chmod 0700 /mnt/dev/vmnet* -# check for the place of VM images - - + config_vmware + for i in /var/lib/vmware /etc/vmware/vmnet1 /etc/vmware/vmnet8 \ + /var/run/vmware ; do + testmkd /mnt/$i + done + chmod 1777 /mnt/var/run/vmware + rm /mnt/etc/vmware/not_configured 2>/dev/null fi # servconfig finished successfully |