--- alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in 2015/07/23 12:25:33 6834 +++ alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in 2015/07/23 12:28:10 6835 @@ -19,7 +19,7 @@ # locations CDPATH="/mnt/cdrom" -INSTALLPATH="/mnt/magellan" +INSTALL_ROOT="/mnt/magellan" # default system settings # standard kernel opts @@ -579,48 +579,48 @@ fi if [[ -n ${ROOTHDD} ]] then - mount ${ROOTHDD} ${INSTALLPATH} || die + mount ${ROOTHDD} ${INSTALL_ROOT} || die fi if [[ -n ${BOOTHDD} ]] then - install -d ${INSTALLPATH}/boot || die - mount ${BOOTHDD} ${INSTALLPATH}/boot || die + install -d ${INSTALL_ROOT}/boot || die + mount ${BOOTHDD} ${INSTALL_ROOT}/boot || die fi - cd ${INSTALLPATH} || die + cd ${INSTALL_ROOT} || die } install_system_image() { - tar xvjpf ${CDPATH}/system/${CDIMAGENAME} -C ${INSTALLPATH} + tar xvjpf ${CDPATH}/system/${CDIMAGENAME} -C ${INSTALL_ROOT} } install_bootsector_chroot() { local my_roothdd - local grubconf=${INSTALLPATH}/boot/grub/grub.conf + local grubconf=${INSTALL_ROOT}/boot/grub/grub.conf local grub2conf=/boot/grub/grub.cfg local CONFIG # check for grub2 - if [[ -f ${INSTALLPATH}/sbin/grub-mkconfig ]] + if [[ -f ${INSTALL_ROOT}/sbin/grub-mkconfig ]] then # needed by grub-mkconfig on the first run - if [[ ! -f ${INSTALLPATH}/boot/grub/video.lst ]] + if [[ ! -f ${INSTALL_ROOT}/boot/grub/video.lst ]] then - install -m0644 ${INSTALLPATH}/lib/grub/*/video.lst ${INSTALLPATH}/boot/grub/video.lst || die + install -m0644 ${INSTALL_ROOT}/lib/grub/*/video.lst ${INSTALL_ROOT}/boot/grub/video.lst || die fi # set kernelopts - if [[ -f ${INSTALLPATH}/etc/conf.d/grub ]] + if [[ -f ${INSTALL_ROOT}/etc/conf.d/grub ]] then - sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALLPATH}/etc/conf.d/grub || die - sed -i "s:^\(export GRUB_GFXPAYLOAD_LINUX=\).*:\1\"${GRUB2GFXPAYLOAD}\":" ${INSTALLPATH}/etc/conf.d/grub || die + sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALL_ROOT}/etc/conf.d/grub || die + sed -i "s:^\(export GRUB_GFXPAYLOAD_LINUX=\).*:\1\"${GRUB2GFXPAYLOAD}\":" ${INSTALL_ROOT}/etc/conf.d/grub || die else - echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" > ${INSTALLPATH}/etc/conf.d/grub || die - echo "export GRUB_GFXPAYLOAD_LINUX=\"${GRUB2GFXPAYLOAD}\"" >> ${INSTALLPATH}/etc/conf.d/grub || die + echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" > ${INSTALL_ROOT}/etc/conf.d/grub || die + echo "export GRUB_GFXPAYLOAD_LINUX=\"${GRUB2GFXPAYLOAD}\"" >> ${INSTALL_ROOT}/etc/conf.d/grub || die fi - CONFIG=${INSTALLPATH}/.installrc + CONFIG=${INSTALL_ROOT}/.installrc clearconfig addconfig 'grub-mkdevicemap' addconfig "LC_ALL=C grub-mkconfig -o ${grub2conf} &> /dev/null" @@ -630,13 +630,13 @@ # grub-legacy else ### grubconf schreiben - source ${INSTALLPATH}/boot/kernelversion + source ${INSTALL_ROOT}/boot/kernelversion #for alx only - if [ -e ${INSTALLPATH}/etc/alx_version ] + if [ -e ${INSTALL_ROOT}/etc/alx_version ] then OLD_ALXVER="${ALXVER}" - source ${INSTALLPATH}/etc/alx_version + source ${INSTALL_ROOT}/etc/alx_version KRNVER="ALX-${ALXVER}" ALXVER="${OLD_ALXVER}" fi @@ -658,7 +658,7 @@ addconfig "default 0" addconfig "timeout 3" # using current root password - addconfig "password --md5 $(cat ${INSTALLPATH}/etc/shadow | grep root | cut -d: -f2)" + addconfig "password --md5 $(cat ${INSTALL_ROOT}/etc/shadow | grep root | cut -d: -f2)" addconfig addconfig "# normal boot" addconfig "title ${KRNVER}" @@ -689,7 +689,7 @@ fi # write bootsector chrooted (lfs/magellan) - CONFIG=${INSTALLPATH}/.installrc + CONFIG=${INSTALL_ROOT}/.installrc clearconfig addconfig '/usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null' addconfig 'root (hd0,0)' @@ -706,7 +706,7 @@ is_initrd_supported() { # only generate initrds if the cmd exists - [[ -x ${INSTALLPATH}/sbin/mkinitrd ]] && return 0 + [[ -x ${INSTALL_ROOT}/sbin/mkinitrd ]] && return 0 return 1 } @@ -739,21 +739,21 @@ fi # install an appropriate uvesafb.conf - CONFIG=${INSTALLPATH}/etc/modprobe.d/uvesafb.conf + CONFIG=${INSTALL_ROOT}/etc/modprobe.d/uvesafb.conf clearconfig addconfig "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" # install an appropriate viafb.conf - CONFIG=${INSTALLPATH}/etc/modprobe.d/viafb.conf + CONFIG=${INSTALL_ROOT}/etc/modprobe.d/viafb.conf clearconfig addconfig "options viafb viafb_mode=1024x768 viafb_refresh=60" # install an appropriate i810fb.conf - CONFIG=${INSTALLPATH}/etc/modprobe.d/i810fb.conf + CONFIG=${INSTALL_ROOT}/etc/modprobe.d/i810fb.conf clearconfig addconfig "options i810fb xres=1024 yres=768 bpp=16 mtrr=1 hsync1=30 hsync2=62 vsync1=30 vsync2=60" - CONFIG=${INSTALLPATH}/.installrc + CONFIG=${INSTALL_ROOT}/.installrc clearconfig addconfig 'echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS} ${OTHERMODS}\"" > /etc/conf.d/mkinitrd' addconfig 'mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null' @@ -802,29 +802,29 @@ then if [[ -n ${BOOTHDD} ]] then - echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die + echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALL_ROOT}/etc/fstab || die fi if [[ -n ${ROOTHDD} ]] then - echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die + echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die fi else if [[ -n ${BOOTHDD} ]] then - echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die + echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALL_ROOT}/etc/fstab || die fi if [[ -n ${ROOTHDD} ]] then - echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die + echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die fi 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" >> ${INSTALLPATH}/etc/fstab || die - echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die - echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die + #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die + echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die + echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALL_ROOT}/etc/fstab || die # install network config skeleton - install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die + install -m0644 ${INSTALL_ROOT}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALL_ROOT}/etc/conf.d/ || die # intel framebufer quirk if [[ -e /proc/fb ]] @@ -834,7 +834,7 @@ fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:') if [[ ${fbdev} != 0 ]] then - sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLPATH}/etc/splash/splash.conf || die + sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALL_ROOT}/etc/splash/splash.conf || die fi fi fi @@ -845,11 +845,11 @@ cd / if [[ -n ${BOOTHDD} ]] then - umount ${INSTALLPATH}/boot || die + umount ${INSTALL_ROOT}/boot || die fi if [[ -n ${ROOTHDD} ]] then - umount ${INSTALLPATH} || die + umount ${INSTALL_ROOT} || die fi if [[ -n ${SWAPHDD} ]] then