diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-05 20:45:30 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-05 20:45:30 (GMT) |
commit | daa272b5f5dac869f2c247452d9c1c72f885dda5 (patch) | |
tree | 1600d48f1ab098a1eb348116547b310d97721ae2 /abs/core-testing/live-installer/install_functions.sh | |
parent | 532096037336792692e4f523535142fb35f00a47 (diff) | |
download | linhes_pkgbuild-daa272b5f5dac869f2c247452d9c1c72f885dda5.zip linhes_pkgbuild-daa272b5f5dac869f2c247452d9c1c72f885dda5.tar.gz linhes_pkgbuild-daa272b5f5dac869f2c247452d9c1c72f885dda5.tar.bz2 |
Add KM->LinHES upgrade support.
Very basic support only imports the hostname and restores the database(if needed).
All other information is left behind.
Diffstat (limited to 'abs/core-testing/live-installer/install_functions.sh')
-rwxr-xr-x | abs/core-testing/live-installer/install_functions.sh | 100 |
1 files changed, 27 insertions, 73 deletions
diff --git a/abs/core-testing/live-installer/install_functions.sh b/abs/core-testing/live-installer/install_functions.sh index 96f5e96..bafb27a 100755 --- a/abs/core-testing/live-installer/install_functions.sh +++ b/abs/core-testing/live-installer/install_functions.sh @@ -255,41 +255,9 @@ unmount_it () { umount /dev/${disk}3 } -#linux-live version of copy_it -# copy_it () { -# #rsync -rvp --exclude=/mnt --exclude=\/$mountpoint / \/$mountpoint -# lzmdir=`find /mnt/live/mnt -name data.lzm -execdir pwd \;| tail -1` -# cd $lzmdir -# if [ x$1 = xALL ] -# then -# LIST=`ls *.lzm` -# else -# LIST=`echo $1 | tr , " " ` -# fi -# -# for i in $LIST -# do -# echo "Transferring $i" -# lzm2dir $i \/$mountpoint -# done -# for i in sys proc dev tmp -# do -# mkdir /$mountpoint/$i -# -# done -# chmod 777 /$mountpoint/tmp -# mknod /$mountpoint/dev/null c 1 3 -# mknod /$mountpoint/dev/null c 1 5 -# mknod /$mountpoint/dev/console c 5 1 -# chmod +s /$mountpoint/usr/bin/Xorg -# chmod +s /$mountpoint/usr/bin/crontab -# chmod +s /$mountpoint/usr/bin/sudo -# chmod +s /$mountpoint/bin/mount -# -# } copy_it () { - + if [ x$1 = xALL ] then echo "Transferring system" @@ -371,7 +339,7 @@ function find_uuid() { uuid=`blkid -s UUID /dev/$1 |cut -d= -f2|cut -d\" -f2` echo $uuid for $1 FOUNDUUID=$uuid - + } @@ -409,13 +377,22 @@ case $1 in then create_fstab fi - if [ x$5 = xUPGRADE ] + #was 5 + if [ x$3 = xUPGRADE ] then - cp -f /tmp/etc/fstab /$mountpoint/etc/fstab + if [ ! -f /tmp/etc/KnoppMyth-version ] + then + if [ -f /tmp/etc/fstab ] + then + cp -f /tmp/etc/fstab /$mountpoint/etc/fstab + else + create_fstab + fi + else + create_fstab + fi fi -# if [ x$5 = xFULL_INSTALL ] -# then #search for UUID FOUNDUUID="" find_uuid ${2}1 @@ -430,54 +407,31 @@ case $1 in FOUNDUUID="" find_uuid ${2}3 DATAUUID=$FOUNDUUID -# fi - - - - sed -i -e "s/.*\/\ .*$/UUID=$ROOTUUID \/ auto defaults,noatime 0 1/g" /$mountpoint/etc/fstab + sed -i -e "s/.*\/\ .*$/UUID=$ROOTUUID \/ auto defaults,noatime 0 1/g" /$mountpoint/etc/fstab sed -i -e "s/.*\/myth\ .*$/UUID=$DATAUUID \/myth auto defaults,noatime 0 1/g" /$mountpoint/etc/fstab sed -i -e "s/.*swap\ .*$/UUID=$SWAPUUID swap swap defaults 0/g" /$mountpoint/etc/fstab -# sed -e "s/\ \/\ .*$/\ \/ $3 defaults 0 1/g"\ -# -e "s/\ \/myth .*$/\ \/myth $4 defaults 0 1/g" /$mountpoint/etc/fstab > /tmp/fstab -# -# -# cp /tmp/fstab /$mountpoint/etc/fstab +#if Knoppmyth upgrade then loop through old fstab picking out vg + + ;; grub_it ) - #linux-live - #grub-install --recheck --no-floppy --root-directory=/$mountpoint /dev/$disk grub-install --recheck --no-floppy --root-directory=/$mountpoint "(hd0)" - - - #fixing fstab -# if [ ! -f /$mountpoint/etc/fstab ] -# then -# cp -f /$mountpoint/etc/fstab.install /$mountpoint/etc/fstab -# fi -# sed -e s/hda/$disk/g /$mountpoint/etc/fstab > /tmp/newfstab -# cp -f /tmp/newfstab /$mountpoint/etc/fstab - - #fixing grub/menu.1st - FOUNDUUID="" - find_uuid ${disk}1 - ROOTUUID=$FOUNDUUID -# sed -e s/hda/$disk/g /$mountpoint/boot/grub/menu.lst > /tmp/menu.lst - - sed -i -e "s/root=.\S*/root=\/dev\/disk\/by-uuid\/$ROOTUUID/g" /$mountpoint/boot/grub/menu.lst - - -#cp -f /tmp/menu.lst /$mountpoint/boot/grub/menu.lst - #cp /etc/X11/xorg.conf /$mountpoint/etc/X11/xorg.conf - mkinitcpio -g /$mountpoint/boot/kernel26.img + #fixing grub/menu.1st + FOUNDUUID="" + find_uuid ${disk}1 + ROOTUUID=$FOUNDUUID + sed -i -e "s/root=.\S*/root=\/dev\/disk\/by-uuid\/$ROOTUUID/g" /$mountpoint/boot/grub/menu.lst + mkinitcpio -g /$mountpoint/boot/kernel26.img ;; umount_it) - umount \/$mountpoint/myth umount \/$mountpoint + ;; + esac |