Changeset 179 in MondoRescue
- Timestamp:
- Dec 12, 2005, 7:50:21 PM (19 years ago)
- Location:
- branches/2.05
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.05/mindi/install.sh
r156 r179 1 #!/bin/ sh1 #!/bin/bash 2 2 3 3 if [ ! -f "mindi" ] ; then … … 5 5 exit 1 6 6 fi 7 local=/usr 8 # local=/usr/local 7 8 if [ "_$PREFIX" = "_" ]; then 9 local=$PREFIX/usr 10 if [ -f /usr/local/sbin/mindi ]; then 11 echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove it !" 12 fi 13 conf=$PREFIX/etc/mindi 14 else 15 local=/usr/local 16 if [ -f /usr/sbin/mindi ]; then 17 echo "WARNING: /usr/sbin/mindi exists. You should probably remove the mindi package !" 18 fi 19 conf=$local/etc/mindi 20 fi 21 9 22 if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then 10 23 local=/ramdisk/usr … … 12 25 fi 13 26 14 mkdir -p $local/share/mindi 27 echo "mindi will be installed under $local" 28 29 echo "Creating target directories ..." 30 mkdir -p $local/lib/mindi 31 mkdir -p $local/share/doc/mindi 15 32 mkdir -p $local/share/man/man8 16 33 mkdir -p $local/sbin 34 mkdir -p $conf 17 35 18 #for i in aux-tools dev rootfs ; do 19 # [ -e "$i.tgz" ] && continue 20 # cd $i 21 # tar -c * | gzip -9 > ../$i.tgz 22 # cd .. 23 # rm -Rf $i 24 #done 36 echo "Copying files ..." 37 cp deplist.txt $conf 38 cp -af rootfs aux-tools isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg parted2fdisk.pl syslinux.cfg syslinux-H.cfg dev.tgz Mindi $local/lib/mindi 39 chmod 755 $local/lib/mindi/rootfs/bin/* 40 chmod 755 $local/lib/mindi/rootfs/sbin/* 41 chmod 755 $local/lib/mindi/aux-tools/sbin/* 25 42 26 cp --parents -pRdf * $local/share/mindi/ 27 ln -sf $local/share/mindi/mindi $local/sbin/ 28 chmod +x $local/sbin/mindi 43 cp -af analyze-my-lvm parted2fdisk.pl $local/sbin 44 if [ "$RPMBUILDMINDI" = "true" ]; then 45 sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=/usr~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=/etc/mindi~" mindi > $local/sbin/mindi 46 else 47 sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$local~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$conf~" mindi > $local/sbin/mindi 48 fi 49 chmod 755 $local/sbin/mindi 50 chmod 755 $local/sbin/analyze-my-lvm 51 chmod 755 $local/sbin/parted2fdisk.pl 52 29 53 cp -a mindi.8 $local/share/man/man8 54 cp -a CHANGES COPYING README README.busybox README.ia64 README.pxe TODO INSTALL $local/share/doc/mindi 55 30 56 echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH." 31 ( cd $local/share/mindi/rootfs && tar -xzf symlinks.tgz ) 57 58 echo "Extracting symlinks ..." 59 ( cd $local/lib/mindi/rootfs && tar -xzf symlinks.tgz ) 60 32 61 ARCH=`/bin/arch` 33 62 echo $ARCH | grep -x "i[0-9]86" &> /dev/null && ARCH=i386 34 63 export ARCH 35 ( cd $local/share/mindi/rootfs && mv bin/busybox-$ARCH bin/busybox) 64 65 if [ -f $local/lib/mindi/rootfs/bin/busybox-$ARCH ]; then 66 echo "Installing busybox ..." 67 mv $local/lib/mindi/rootfs/bin/busybox-$ARCH $local/lib/mindi/rootfs/bin/busybox 68 else 69 echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)" 70 fi 71 36 72 if [ "$ARCH" = "i386" ] ; then 37 ( cd $local/share/mindi/rootfs && mv bin/busybox-$ARCH.net bin/busybox.net) 73 if [ -f $local/lib/mindi/rootfs/bin/busybox-$ARCH.net ]; then 74 echo "Installing busybox.net ..." 75 mv $local/lib/mindi/rootfs/bin/busybox-$ARCH.net $local/lib/mindi/rootfs/bin/busybox.net 76 else 77 echo "WARNING: no busybox.net found, mindi will not work on this arch ($ARCH) with network" 78 fi 38 79 fi 80 39 81 if [ "$ARCH" = "ia64" ] ; then 40 make -f Makefile.parted2fdisk 41 make -f Makefile.parted2fdisk install 42 ( cd $local/share/mindi/rootfs && mv sbin/parted2fdisk-ia64 sbin/parted2fdisk) 82 make -f Makefile.parted2fdisk DEST=$local/lib/mindi install 83 if [ -f $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then 84 echo "Installing parted2fdisk ..." 85 mv $local/lib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/lib/mindi/rootfs/sbin/parted2fdisk 86 else 87 echo "WARNING: no parted2fdisk found, mindi will not work on this arch ($ARCH)" 88 fi 43 89 else 44 ( cd $local/share/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk) 90 echo "Symlinking fdisk to parted2fdisk" 91 ( cd $local/lib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk) 45 92 fi 46 ls /etc/mindi/* > /dev/null 2>/dev/null 47 [ "$?" -ne "0" ] && rm -Rf /etc/mindi 93 48 94 exit 0 -
branches/2.05/mindi/mindi
r177 r179 1 1 #!/bin/bash 2 2 3 # $Id$ 4 # 3 5 #----------------------------------------------------------------------------- 4 6 # mindi - mini-Linux distro based on the user's filesystem & distribution … … 25 27 26 28 MINDI_VERSION=1.05 29 MINDI_PREFIX=XXX 30 MINDI_CONF=YYY 31 MINDI_SBIN=${MINDI_PREFIX}/sbin 32 MINDI_LIB=${MINDI_PREFIX}/lib/mindi 27 33 28 34 EXTRA_SPACE=24576 ; # increase if you run out of ramdisk space … … 43 49 # you want to use your own kernel, or the supplied default. 44 50 # If "yes" mindi will automatically use your own kernel. 45 MINDI_CONFIG=" /etc/mindi/mindi.conf"51 MINDI_CONFIG="$MINDI_CONF/mindi.conf" 46 52 if [ -f $MINDI_CONFIG ]; then 47 53 . $MINDI_CONFIG … … 104 110 incoming=`ReadLine` 105 111 done 106 if [ -e "$MINDI_ HOME/memtest.img" ] ; then112 if [ -e "$MINDI_LIB/memtest.img" ] ; then 107 113 # echo -en "label memtest\n kernel memtest.bin\n\n" 108 114 echo -en "label memtest\n kernel memdisk\n append initrd=memtest.img\n\n" … … 126 132 which afio > /dev/null 2> /dev/null || LogIt "afio not found... mindi doesn't need afio but Mondo does... Be aware...\n" 127 133 [ ! -e "/etc/issue.net" ] && > /etc/issue.net 128 FDISK=$MINDI_ HOME/parted2fdisk.pl134 FDISK=$MINDI_SBIN/parted2fdisk.pl 129 135 FDISKLOG=/tmp/parted2fdisk.log 130 136 touch $FDISKLOG … … 214 220 mappath=$1 215 221 KBDEPTH=$(($KBDEPTH+1)) 216 [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_ HOME/mindi and disable FindAndAddUserKeyboardMappingFile (line 1170, approx.)"222 [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 1170, approx.)" 217 223 if [ -e "$bigdir/$mappath" ] ; then 218 224 echo "$mappath already added" >> $LOGFILE … … 622 628 623 629 if [ $SYMLINK -ne 1 ] ; then 624 if [ -d "$mh/mindi" ] && [ -e "$mh/mindi/aux-tools" ] ; then625 [ "$MINDI_HOME" ] && Die "You have multiple instances of Mindi - one at $MINDI_HOME and one at $mh/mindi"626 MINDI_HOME=$mh/mindi627 fi628 630 if [ -d "$mh/mondo" ] && [ -e "$mh/mondo/restore-scripts" ] ; then 629 631 [ "$MONDO_HOME" ] && Die "You have multiple instances of Mondo - one at $MONDO_HOME and one at $mh/mondo" … … 635 637 # end patch 636 638 637 # for mh in /usr/share /usr/local /usr/local/share /usr/share/local /opt /opt/share /usr ; do 638 # if [ -d "$mh/mindi" ] && [ -e "$mh/mindi/aux-tools" ] ; then 639 # [ "$MINDI_HOME" ] && Die "You have multiple instances of Mindi - one at $MINDI_HOME and one at $mh/mindi" 640 # MINDI_HOME=$mh/mindi 641 # fi 642 # if [ -d "$mh/mondo" ] && [ -e "$mh/mondo/restore-scripts" ] ; then 643 # [ "$MONDO_HOME" ] && Die "You have multiple instances of Mondo - one at $MONDO_HOME and one at $mh/mondo" 644 # MONDO_HOME=$mh/mondo 645 # fi 646 # done 647 648 [ "$MINDI_HOME" = "" ] && Die "Unable to locate Mindi's home directory" 649 echo "MINDI_HOME = $MINDI_HOME" >> $LOGFILE 639 [ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly." 640 echo "MINDI_LIB = $MINDI_LIB" >> $LOGFILE 641 echo "MINDI_SBIN = $MINDI_SBIN" >> $LOGFILE 642 [ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly." 643 echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE 650 644 echo "MONDO_HOME = $MONDO_HOME" >> $LOGFILE 651 [ -e "/etc/mindi" ] && MINDI_CONF=/etc/mindi || MINDI_CONF=$MINDI_HOME652 echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE653 645 mkdir -p $CACHE_LOC 654 646 } … … 1341 1333 if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then 1342 1334 echo -en "\rAnalyzing LVM...\r" 1343 all_partitions=`$MINDI_ HOME/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`1335 all_partitions=`$MINDI_SBIN/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32` 1344 1336 fi 1345 1337 all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`" … … 1505 1497 echo -en " " > $1 1506 1498 if [ "`cat /etc/issue.net 2> /dev/null | fgrep -i "debian"`" ] ; then 1507 cat $MINDI_ HOME/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cat /etc/issue.net | cut -d ' ' -f 3` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ >> $1.tmp1508 else 1509 cat $MINDI_ HOME/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`cat /etc/issue.net | grep -i "linux" | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`cat /etc/issue.net | grep -i "kernel" | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' '\\r' 'on' 'an' '\/' '`uname -r`' 'on' 'an' '`uname -m`/ >> $1.tmp1499 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cat /etc/issue.net | cut -d ' ' -f 3` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ >> $1.tmp 1500 else 1501 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`cat /etc/issue.net | grep -i "linux" | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`cat /etc/issue.net | grep -i "kernel" | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' '\\r' 'on' 'an' '\/' '`uname -r`' 'on' 'an' '`uname -m`/ >> $1.tmp 1510 1502 fi 1511 1503 cat $1.tmp | sed s/%r/"`uname -r`"/ | sed s/%t/"`hostname`"/ > $1 … … 1516 1508 elif [ ! "$MONDO_TMP" ] ; then 1517 1509 echo -en "FYI, this is _not_ a Mondo Rescue CD.\n" >> $1 1518 if [ -e "$MINDI_ HOME/memtest.img" ] ; then1510 if [ -e "$MINDI_LIB/memtest.img" ] ; then 1519 1511 echo -en "Type 'memtest' <Enter> to test your PC's memory intensively.\nJust press <Enter> to go to the main test menu.\n" >> $1 1520 1512 fi … … 1609 1601 cd $TMP_ROOT/iso 1610 1602 mkdir -p $MONDO_ROOT/iso/isolinux 1611 echo "mindi_ home = $MINDI_HOME" >> $LOGFILE1612 cp $MINDI_ HOME/mem{test,disk}* $MONDO_ROOT 2>> $LOGFILE1603 echo "mindi_lib = $MINDI_LIB" >> $LOGFILE 1604 cp $MINDI_LIB/mem{test,disk}* $MONDO_ROOT 2>> $LOGFILE 1613 1605 for i in memdisk memtest.bin memtest.img ; do 1614 j=$MINDI_ HOME/$i1606 j=$MINDI_LIB/$i 1615 1607 k=$TMP_ROOT/iso/isolinux 1616 1608 if [ -e "$j" ] ; then … … 1674 1666 disksize=$1 1675 1667 if [ "`cat /etc/issue.net 2> /dev/null | fgrep -i "debian"`" ] ; then 1676 cat $MINDI_ HOME/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cat /etc/issue.net | cut -d ' ' -f 3` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/1677 else 1678 cat $MINDI_ HOME/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`cat /etc/issue.net | grep -i "linux" | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`cat /etc/issue.net | grep -i "kernel" | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' 'r' 'on' 'an' 'm/' '`uname -r`' 'on' 'an' '`uname -m`/1668 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s%DDDDD%"Debian GNU\/`uname -s` `cat /etc/issue.net | cut -d ' ' -f 3` `hostname`"% | sed s/KKKKK/"Kernel `uname -r` on a `uname -m`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ 1669 else 1670 cat $MINDI_LIB/msg-txt | sed s/ZZZZZ/$MINDI_VERSION/ | sed s/YYYYY/"Mondo Rescue"/ | sed s/XXXXX/"a cousin of"/ | sed s/DDDDD/"`cat /etc/issue.net | grep -i "linux" | head -n1 | tr -s ' ' ' '`"/ | sed s/KKKKK/"`cat /etc/issue.net | grep -i "kernel" | head -n1 | tr -s ' ' ' '`"/ | sed s/TTTTT/"`LC_TIME=C date`"/ | sed s/' 'r' 'on' 'an' 'm/' '`uname -r`' 'on' 'an' '`uname -m`/ 1679 1671 fi 1680 1672 if [ "$disksize" -gt "2880" ] ; then … … 1733 1725 rdev -r vmlinuz 49152 1734 1726 1735 tar -zxf $MINDI_ HOME/dev.tgz || LogIt "Cannot untar dev.tgz\n"1727 tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n" 1736 1728 losetup /dev/loop0 > /dev/null 2> /dev/null 1737 1729 [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary.\n" … … 1860 1852 1861 1853 1862 #MINDI_HOME=/usr/share/mindi1863 #rm -f /tmp/boot.img*1864 #write_full_floppy_of_kernel /usr/share/mindi/vmlinuz /tmp/boot.img 14401865 #exit $?1866 1867 1868 1869 1870 1871 1854 PrepareBootDiskImage_LILO() { 1872 1855 local disksize imagesdir dev imagefile mountpoint fname i kernelpath ramdisksize cfg_file testpath options retval outstr old_pwd ooo max_kernel_size liloconf … … 1879 1862 [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel" 1880 1863 echo -en "Making "$disksize"KB boot disk..." 1881 TurnTgzIntoRdz $MINDI_ HOME/rootfs $TMP_ROOT/mindi.rdz $ramdisksize $disksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?"1864 TurnTgzIntoRdz $MINDI_LIB/rootfs $TMP_ROOT/mindi.rdz $ramdisksize $disksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?" 1882 1865 if [ "$ARCH" != "ia64" ] ; then 1883 1866 [ "$disksize" != "1722" ] && [ "$disksize" != "2880" ] && [ "$disksize" != "5760" ] && Die "PDBI - disksize is $disksize - bad size" … … 1908 1891 cd $mountpoint 1909 1892 if [ "$ARCH" != "ia64" ] ; then 1910 tar -zxf $MINDI_ HOME/dev.tgz || LogIt "Cannot untar dev.tgz\n"1893 tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n" 1911 1894 fi 1912 1895 cd $old_pwd … … 1931 1914 mkdir -p $mountpoint/tmp 1932 1915 cp -f $TMP_ROOT/mondo-restore.cfg $mountpoint/tmp &> /dev/null 1933 if [ -e "$MINDI_ HOME/memtest.img" ] ; then1916 if [ -e "$MINDI_LIB/memtest.img" ] ; then 1934 1917 echo -en "image=/memtest.bin\nlabel=memtest\nn" >> $liloconf 1935 1918 echo -en "image=/memdisk\nlabel=memtest\nappend=\"initrd=memtest.img\"\n" >> $liloconf … … 1972 1955 # make it bootable 1973 1956 rm -f $mountpoint/zero 1974 [ -e "$MINDI_ HOME/memdisk" ] && cp -f $MINDI_HOME/memdisk $mountpoint1957 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 1975 1958 if [ "$disksize" -gt "2880" ] && [ ! "$KERN_DISK_MADE" ] ; then 1976 1959 if [ "$ARCH" != "ia64" ] ; then … … 2031 2014 [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel" 2032 2015 echo -en "Making "$disksize"KB boot disk..." 2033 TurnTgzIntoRdz $MINDI_ HOME/rootfs $TMP_ROOT/mindi.rdz $ramdisksize $disksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?"2016 TurnTgzIntoRdz $MINDI_LIB/rootfs $TMP_ROOT/mindi.rdz $ramdisksize $disksize `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into mindi.rdz; are you SURE your kernel supports loopfs?" 2034 2017 [ "$disksize" != "1722" ] && [ "$disksize" != "2880" ] && [ "$disksize" != "5760" ] && Die "PDBI - disksize is $disksize - bad size" 2035 2018 echo -en "..." … … 2044 2027 # play nicely and I don't care. :) I have worked around the problem. -Hugo, 06/27/2002 2045 2028 if [ "$disksize" = "1722" ] ; then 2046 gzip -dc $MINDI_ HOME/sys-disk.raw.gz > $imagefile || Die "Cannot dd blank file"2029 gzip -dc $MINDI_LIB/sys-disk.raw.gz > $imagefile || Die "Cannot dd blank file" 2047 2030 else 2048 2031 dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file" … … 2056 2039 cd $mountpoint 2057 2040 [ -e "$sys_cfg_file" ] || Die "Obi Wan, word up?" 2058 # tar -zxf $MINDI_ HOME/dev.tgz || LogIt "Cannot untar dev.tgz\n" <--- present for LILO; is it nec. for SYSLINUX too?2041 # tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n" <--- present for LILO; is it nec. for SYSLINUX too? 2059 2042 cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root" 2060 2043 if [ -e "$MONDO_TMP/start-nfs" ] ; then … … 2110 2093 rm -f $mountpoint/zero 2111 2094 mkdir -p $mountpoint/etc 2112 [ -e "$MINDI_ HOME/memdisk" ] && cp -f $MINDI_HOME/memdisk $mountpoint2095 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2113 2096 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 2114 2097 echo -en "..." … … 2216 2199 2217 2200 # more stuff 2218 # cp -f $MINDI_ HOME/embleer* $bigdir2201 # cp -f $MINDI_LIB/embleer* $bigdir 2219 2202 old_pwd=`pwd` 2220 2203 cd $bigdir 2221 2204 2222 [ -e "$MINDI_ HOME/aux-tools" ] || Die "aux-tools not found in Mindi's home dir. Do you have multiple copies of Mindi lying around? Please delete them. No, don't e-mail me and ask how. ;) Use 'rm'."2223 cp -Rdf $MINDI_ HOME/aux-tools/* . 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping aux-tools\n"2224 if [ -e "$MINDI_ HOME/x11-tools.tgz" ] ; then2225 tar -zxf $MINDI_ HOME/x11-tools.tgz 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping x11-tools.tgz\n"2205 [ -e "$MINDI_LIB/aux-tools" ] || Die "aux-tools not found in Mindi's home dir. Do you have multiple copies of Mindi lying around? Please delete them. No, don't e-mail me and ask how. ;) Use 'rm'." 2206 cp -Rdf $MINDI_LIB/aux-tools/* . 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping aux-tools\n" 2207 if [ -e "$MINDI_LIB/x11-tools.tgz" ] ; then 2208 tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "Warning - error occurred while unzipping x11-tools.tgz\n" 2226 2209 fi 2227 2210 if [ -e "$MONDO_HOME/restore-scripts" ] ; then 2228 2211 cp -Rdf $MONDO_HOME/restore-scripts/* . 2>> $LOGFILE 2229 [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] && Die "Cannot find/install $MINDI_ HOME/restore-scripts"2212 [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] && Die "Cannot find/install $MINDI_LIB/restore-scripts" 2230 2213 fi 2231 2214 [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . … … 2246 2229 cp -f $TMP_ROOT/mountlist.txt $CACHE_LOC 2247 2230 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MONDO_TMP/. 2248 [ -d "/proc/lvm" ] && $MINDI_ HOME/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm2249 [ -d "/dev/mapper" ] && $MINDI_ HOME/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm2231 [ -d "/proc/lvm" ] && $MINDI_SBIN/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2232 [ -d "/dev/mapper" ] && $MINDI_SBIN/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2250 2233 cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE 2251 2234 ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks … … 2728 2711 old_pwd=`pwd` 2729 2712 cd $mountpoint 2730 # [ -e "$MINDI_ HOME/memtest.img" ] && echo "Yep, this is a multi-function CD" > MULTIFUNC2713 # [ -e "$MINDI_LIB/memtest.img" ] && echo "Yep, this is a multi-function CD" > MULTIFUNC 2731 2714 cp -Rdf $tgz_dir_fname/* . 2>> $LOGFILE >> $LOGFILE 2732 2715 tar -zxf symlinks.tgz || Die "Cannot untar symlinks.tgz" … … 2820 2803 # done 2821 2804 # fi 2822 if [ ! -e "/sbin/devfsd" ] || [ "$disksize" -lt "2880" ] || [ "$kernelpath" = "$MINDI_ HOME/vmlinuz" ] ; then2805 if [ ! -e "/sbin/devfsd" ] || [ "$disksize" -lt "2880" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then 2823 2806 echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE 2824 2807 [ ! -e "/sbin/devfsd" ] && echo "...because /sbin/devfsd not found" >> $LOGFILE 2825 2808 [ "$disksize" -lt "2880" ] && echo "...because disksize = $disksize" >> $LOGFILE 2826 [ "$kernelpath" = "$MINDI_ HOME/vmlinuz" ] && echo "...because kernel is failsafe" >> $LOGFILE2809 [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] && echo "...because kernel is failsafe" >> $LOGFILE 2827 2810 # ls -l $mountpoint/sbin/devfsd &> /dev/null || Die "Can't find devfsd daemon on ramdisk" 2828 2811 rm -f $mountpoint/sbin/devfsd … … 2982 2965 fi 2983 2966 FixPathIfBroken 2984 [ -f "$MINDI_ HOME/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_HOME/vmlinuz 2> /dev/null | grep "2\.4" | cut -d' ' -f1`2967 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep "2\.4" | cut -d' ' -f1` 2985 2968 AbortIfMkfsVfatMissing 2986 2969 ### BCO … … 3108 3091 [ "$CDRECOVERY" = "yes" ] || CDRECOVERY=no 3109 3092 if [ "$CDRECOVERY" = "yes" ] ; then 3110 iso_cfg_file=$MINDI_ HOME/isolinux-H.cfg3111 sys_cfg_file=$MINDI_ HOME/syslinux-H.cfg3093 iso_cfg_file=$MINDI_LIB/isolinux-H.cfg 3094 sys_cfg_file=$MINDI_LIB/syslinux-H.cfg 3112 3095 else 3113 iso_cfg_file=$MINDI_ HOME/isolinux.cfg3114 sys_cfg_file=$MINDI_ HOME/syslinux.cfg3096 iso_cfg_file=$MINDI_LIB/isolinux.cfg 3097 sys_cfg_file=$MINDI_LIB/syslinux.cfg 3115 3098 fi 3116 3099 … … 3134 3117 mkdir -p $imagesdir 3135 3118 if [ ! "`DidMondoCallMe`" ] ; then 3136 LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION by Hugo Rabson"3137 LogIt "Latest Mindi is available from http:// www.mondorescue.org"3119 LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION" 3120 LogIt "Latest Mindi is available from http://mondorescue.berlios.de" 3138 3121 LogIt "BusyBox sources are available from http://www.busybox.net" 3139 3122 LogIt "------------------------------------------------------------------------------" … … 3197 3180 fi 3198 3181 if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then 3199 kernelpath=$MINDI_ HOME/vmlinuz3182 kernelpath=$MINDI_LIB/vmlinuz 3200 3183 LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks." 3201 3184 LogIt "However, you are still running your kernel. If Mindi fails to create your" … … 3203 3186 pwd=`pwd` 3204 3187 cd $TMP_ROOT 3205 bzip2 -dc $MINDI_ HOME/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"3188 bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2" 3206 3189 cd $pwd 3207 3190 YOUR_KERNEL_SUCKS="Your kernel sucks" … … 3247 3230 3248 3231 3249 [ -e "$MINDI_ HOME/memtest.img" ] && BOOT_MEDIA_MESSAGE="$BOOT_MEDIA_MESSAGE\n\3232 [ -e "$MINDI_LIB/memtest.img" ] && BOOT_MEDIA_MESSAGE="$BOOT_MEDIA_MESSAGE\n\ 3250 3233 ...Or type 'memtest' to test your PC's RAM thoroughly.\n" 3251 3234 -
branches/2.05/mindi/mindi.spec
r156 r179 63 63 64 64 %{__rm} -rf $RPM_BUILD_ROOT 65 MINDIDIR=$RPM_BUILD_ROOT%{_datadir}/mindi 66 67 %{__mkdir_p} $MINDIDIR $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sysconfdir}/mindi $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT/%{_mandir}/man8 68 %{__cp} deplist.txt $RPM_BUILD_ROOT%{_sysconfdir}/mindi/ 69 %{__cp} -af * $MINDIDIR 70 %{__cp} -af mindi.8 $RPM_BUILD_ROOT/%{_mandir}/man8 71 72 %ifarch ia64 73 %{__make} -f Makefile.parted2fdisk DEST=${MINDIDIR}/ install 74 %{__mv} $MINDIDIR/rootfs/bin/busybox-ia64 $MINDIDIR/rootfs/bin/busybox 75 %{__mv} $MINDIDIR/rootfs/sbin/parted2fdisk-ia64 $MINDIDIR/rootfs/sbin/parted2fdisk 76 %else 77 %{__mv} $MINDIDIR/rootfs/bin/busybox-i386 $MINDIDIR/rootfs/bin/busybox 78 %{__mv} $MINDIDIR/rootfs/bin/busybox-i386.net $MINDIDIR/rootfs/bin/busybox.net 79 %{__ln_s} fdisk $MINDIDIR/rootfs/sbin/parted2fdisk 80 %endif 65 MINDIDIR=$RPM_BUILD_ROOT%{_libdir}/mindi 66 export PREFIX=${RPM_BUILD_ROOT} 67 export RPMBUILDMINDI="true" 68 69 ./install.sh 70 81 71 %{__rm} -f $MINDIDIR/rootfs/bin/busybox-ia64 $MINDIDIR/rootfs/sbin/parted2fdisk-ia64 $MINDIDIR/rootfs/bin/busybox-i386 $MINDIDIR/rootfs/bin/busybox-i386.net 82 83 #84 # These are installed twice if not removed here85 #86 ( cd $MINDIDIR87 %{__rm} -f CHANGES INSTALL COPYING README TODO README.ia64 README.pxe mindi.888 )89 90 # Symlinks91 92 cd $RPM_BUILD_ROOT%{_sbindir}93 %{__ln_s} -f %{_datadir}/mindi/mindi .94 %{__ln_s} -f %{_datadir}/mindi/analyze-my-lvm .95 %ifarch ia6496 %{__ln_s} -f %{_datadir}/mindi/parted2fdisk.pl .97 %endif98 72 99 73 %clean … … 101 75 102 76 %post 77 if [ -f /usr/local/sbin/mindi ]; then 78 echo "WARNING: /usr/local/sbin/mindi exists. You should probably remove your manual mindi installation !" 79 fi 80 103 81 %ifarch ia64 104 82 %{__mkdir_p} /usr/local/bin … … 106 84 %{__cp} /sbin/fdisk /sbin/fdisk.mondosav 107 85 %{__mv} /sbin/fdisk /usr/local/bin/fdisk 108 %{__ln_s} -f /usr/s hare/mindi/parted2fdisk.pl /sbin/fdisk86 %{__ln_s} -f /usr/sbin/parted2fdisk.pl /sbin/fdisk 109 87 echo "Warning: you fdisk binary is now under /usr/local/bin" 110 88 fi … … 114 92 %defattr(644,root,root,755) 115 93 %config(noreplace) %{_sysconfdir}/mindi/deplist.txt 116 %doc CHANGES INSTALL COPYING README TODO README.ia64 README.pxe 117 %attr(755,root,root) %{_sbindir}/mindi 118 %attr(755,root,root) %{_sbindir}/analyze-my-lvm 119 %{_datadir}/mindi 94 %doc CHANGES INSTALL COPYING README TODO README.ia64 README.pxe README.busybox 95 %{_sbindir} 96 %{_libdir}/mindi 120 97 %{_mandir} 121 %attr(755,root,root) %{_datadir}/mindi/analyze-my-lvm122 %attr(755,root,root) %{_datadir}/mindi/mindi123 %attr(755,root,root) %{_datadir}/mindi/parted2fdisk.pl124 %attr(755,root,root) %{_datadir}/mindi/aux-tools/sbin/*125 %attr(755,root,root) %{_datadir}/mindi/rootfs/bin/*126 %attr(755,root,root) %{_datadir}/mindi/rootfs/sbin/*127 98 128 99 %changelog 129 100 * Fri Nov 05 2005 Bruno Cornec <bcornec@users.berlios.de> 1.05 130 101 - ia64 is now working 131 - NFS related bug fixed132 - ldd related bugs fixed102 - use install.sh script 103 - use libdir for binary data 133 104 134 105 * Tue Sep 06 2005 Bruno Cornec <bcornec@users.berlios.de> 1.04_berlios -
branches/2.05/mindi/rootfs/etc/bashrc
r30 r179 1 PATH=/mondo:/usr/ share/mondo:/usr/share/mindi:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:.1 PATH=/mondo:/usr/lib/mondo:/usr/lib/mindi:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:. 2 2 HOSTNAME="mondo" 3 3 TERM=linux -
branches/2.05/mondo/configure.in
r102 r179 1 dnl Autoconfigure file for Mondo Rescue v2.0x _berlios1 dnl Autoconfigure file for Mondo Rescue v2.0x 2 2 dnl Mondo by Hugo Rabson 3 3 dnl This script by Joshua Oreman -
branches/2.05/mondo/mondo.spec
r102 r179 124 124 125 125 %attr(755,root,root) %{_sbindir}/* 126 %attr(755,root,root) %{_ datadir}/%{name}/restore-scripts/%{name}127 %{_ datadir}/%{name}126 %attr(755,root,root) %{_libdir}/%{name}/restore-scripts/%{name} 127 %{_libdir}/%{name} 128 128 %{_mandir}/* 129 129 %{_libdir}/* … … 139 139 - ia64 is now working 140 140 - -p option related bug fixed 141 - use libdir instead of datadir 141 142 142 143 * Tue Sep 06 2005 Bruno Cornec <bcornec@users.berlios.de> 2.04_berlios -
branches/2.05/mondo/mondo/Makefile.am
r102 r179 4 4 DIST_SUBDIRS = common mondoarchive mondorestore xmondo docs restore-scripts 5 5 6 pkg data_DATA = do-not-compress-these autorun6 pkglib_DATA = do-not-compress-these autorun 7 7 8 8 install-data-hook: post-nuke.sample 9 cp -R post-nuke.sample $(pkg datadir)/9 cp -R post-nuke.sample $(pkglibdir)/ -
branches/2.05/mondo/mondo/mondorestore/mondo-restore.c
r128 r179 3371 3371 toggle_node_selection(filelist, FALSE); 3372 3372 toggle_all_root_dirs_on(filelist); 3373 // BERLIOS: /usr/lib ??? 3373 3374 toggle_path_selection(filelist, "/usr/share", TRUE); 3374 3375 // show_filelist(filelist); -
branches/2.05/mondo/mondo/restore-scripts/Makefile.am
r30 r179 1 1 SUBDIRS = mondo usr 2 2 3 restoreetcdir = $(pkg datadir)/restore-scripts/etc3 restoreetcdir = $(pkglibdir)/restore-scripts/etc 4 4 restoreetc_DATA = etc/multipath.conf.sample etc/raid0.conf.sample \ 5 5 etc/raid1.conf.sample etc/raid4.conf.sample \ -
branches/2.05/mondo/mondo/restore-scripts/mondo/Makefile.am
r30 r179 1 restoremondodir = $(pkg datadir)/restore-scripts/mondo1 restoremondodir = $(pkglibdir)/restore-scripts/mondo 2 2 restoremondo_SCRIPTS = ISO ask-me-a-question compare-me compare-subroutine-me \ 3 3 edit-mountlist grub-MR hack-fstab hack-grub hack-lilo hack-elilo \ -
branches/2.05/mondo/mondo/restore-scripts/usr.bin/Makefile.am
r30 r179 1 restoreusrbindir = $(pkg datadir)/restore-scripts/usr/bin1 restoreusrbindir = $(pkglibdir)/restore-scripts/usr/bin 2 2 #restoreusrbin_SCRIPTS = # petris pico nano -
branches/2.05/mondo/mondo/restore-scripts/usr/bin/Makefile.am
r30 r179 1 restoreusrbindir = $(pkg datadir)/restore-scripts/usr/bin1 restoreusrbindir = $(pkglibdir)/restore-scripts/usr/bin 2 2 #restoreusrbin_SCRIPTS = petris nano -
branches/2.05/mondo/mondo/xmondo/Makefile.am
r30 r179 7 7 xmondo_LDADD = ../common/libXmondo.la $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) -L/usr/local/lib -L/usr/X11R6/lib 8 8 xmondo_LDFLAGS = $(all_libraries) @my_qt_libraries@ @my_kde_libraries@ $(KDE_RPATH) 9 pkg data_DATA = mondo.png9 pkglib_DATA = mondo.png 10 10 11 11 xmondobackup.moc.cpp: xmondobackup.h
Note:
See TracChangeset
for help on using the changeset viewer.