--- trunk/installer-simple/bin/installer.sh.in 2014/01/07 14:30:19 2438 +++ trunk/installer-simple/bin/installer.sh.in 2014/01/07 14:50:35 2443 @@ -514,12 +514,7 @@ [[ -z ${KRNIMG} ]] && KRNIMG="vmlinuz" # uuid support - if is_uuid_supported - then - my_roothdd="UUID=$(get_uuid ${ROOTHDD})" - else - my_roothdd="${ROOTHDD}" - fi + my_roothdd="UUID=$(get_uuid ${ROOTHDD})" : > ${grubconf} || dialog_die echo "default 0" >> ${grubconf} || dialog_die @@ -574,13 +569,6 @@ rm ${INSTALLROOT}/root/.installrc } -is_initrd_supported() -{ - # only generate initrds if the cmd exists - [[ -x ${INSTALLROOT}/sbin/mkinitrd ]] && return 0 - return 1 -} - install_initrd_chroot() { # only generate initrds if the cmd exists @@ -628,46 +616,35 @@ rm ${INSTALLROOT}/root/.installrc } -is_uuid_supported() -{ - if [[ -x $(type -P busybox.mkinitrd) ]] - then - # only detect uuids if supported - if [[ ! -z $(busybox.mkinitrd | grep blkid) ]] - then - return 0 - fi - fi - - return 1 -} - install_system_settings() { - # schreibe fstab - if is_uuid_supported - then - echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die - else - echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die - fi - # not needed busybox loads all with swapon -a, even if not mentioned in fstab - #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die - echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die - echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die + local CONFIG + + # write fstab + CONFIG="${INSTALLROOT}/etc/fstab" + clearconfig + addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" + addconfig -e "proc\t/proc\tproc\tdefaults\t0 0" + addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" # install network config skeleton - install -m0644 ${INSTALLROOT}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLROOT}/etc/conf.d/ || dialog_die + CONFIG="${INSTALLROOT}/etc/conf.d/net.eth0" + clearconfig + addconfig 'ONBOOT="yes"' + addconfig 'NETWORKING="dhcp"' - # intel framebufer quirk - if [[ -e /proc/fb ]] + # intel framebuffer quirk + if [ -e ${INSTALLROOT}/etc/splash/splash.conf ] then - if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]] + if [ -e /proc/fb ] then - fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:') - if [[ ${fbdev} != 0 ]] + if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]] then - sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLROOT}/etc/splash/splash.conf || dialog_die + fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:') + if [[ ${fbdev} != 0 ]] + then + sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLROOT}/etc/splash/splash.conf || dialog_die + fi fi fi fi @@ -701,11 +678,16 @@ dialog_install_settings sleep 1 install_system_settings - dialog_install_initrd - install_initrd_chroot + if is_initrd_supported + then + dialog_install_initrd + initrd_config + initrd_install + fi dialog_install_bootsector - install_bootsector_chroot + bootloader_config + bootloader_install install_umount_rootfs dialog_install_successful @@ -724,11 +706,16 @@ dialog_install_settings sleep 1 install_system_settings - dialog_install_initrd - install_initrd_chroot + if is_initrd_supported + then + dialog_install_initrd + initrd_config + initrd_install + fi dialog_install_bootsector - install_bootsector_chroot + bootloader_config + bootloader_install install_umount_rootfs dialog_install_successful