Changeset 1989 in MondoRescue
- Timestamp:
- Jun 22, 2008, 10:17:59 PM (17 years ago)
- Location:
- branches/2.2.7
- Files:
-
- 6 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.7/mindi/install.sh
r1983 r1989 69 69 70 70 echo "Creating target directories ..." 71 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $CACHEDIR # $DOCDIR71 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $CACHEDIR 72 72 73 73 echo "Copying files ..." … … 112 112 fi 113 113 114 # Special case for SuSE family where doc is put elsewhere in the RPM115 # if [ -e /etc/SuSE-release ]; then116 # rm -rf $DOCDIR117 # fi118 119 # Special case for Debian family where doc is put elsewhere in the DEB120 # if [ -e /etc/debian_version ]; then121 # rm -rf $DOCDIR122 # fi123 124 114 exit 0 -
branches/2.2.7/mindi/mindi
r1986 r1989 160 160 161 161 162 ChopUpAndCopyFile() {163 local filename slicesize outdir res biggienumber filesize sliceno noof_slices testfile scratchfile164 filename=$1165 outdir=$2166 slicesize=$3167 biggienumber=$4168 169 [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend $DEPLIST_FILE accordingly."170 mkdir -p $outdir171 172 sliceno=0173 scratchfile=$MINDI_TMP/blah.$$.dat174 cp -f $filename $scratchfile 2>> $LOGFILE || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?"175 [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"176 [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"177 178 # Uncompress modules only if not using udevd179 if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then180 mv $scratchfile $scratchfile.gz181 gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz"182 filename=`echo "$filename" | tr '.' '#' | sed s/#o#gz/#o/ | sed s/#ko#gz/#ko/ | tr '#' '.'`183 fi184 filesize=`du -sk $scratchfile | cut -f1`185 noof_slices=$(($filesize/$slicesize))186 echo "$filename" > $outdir/slice-$biggienumber.name187 echo "$filesize" > $outdir/slice-$biggienumber.size188 [ -x "$scratchfile" ] && StripExecutable $scratchfile "-$filename-"189 while [ "$sliceno" -le "$noof_slices" ] ; do190 dd if=$scratchfile skip=$(($sliceno*$slicesize)) of=$outdir/slice-$biggienumber.`printf "%03d" $sliceno` bs=1k count=$slicesize &> /dev/null191 sliceno=$(($sliceno+1))192 done193 rm -f $scratchfile194 }195 196 197 162 CopyDependenciesToDirectory() { 198 local outdir incoming fname filesizecounter d found163 local outdir incoming fname counter d found 199 164 outdir=$1 200 165 mkdir -p $outdir … … 218 183 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 219 184 elif [ -e "$incoming" ] && [ $found = "false" ]; then 220 filesize=`du -sk $incoming | cut -f1` 221 if [ "$filesize" -gt "$(($CHOPSIZE*2))" ] && [ ! -h "$incoming" ] ; then 222 ChopUpAndCopyFile $incoming $outdir $CHOPSIZE $BIGNO 223 BIGNO=$(($BIGNO+1)) 224 else 225 tar cf - $incoming 2> /dev/null | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 226 227 # Only uncompress modules if not using udevd 228 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then 229 gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming" 230 fi 231 [ -x "$outdir" ] && StripExecutable $outdir "-$filename-" 185 tar cf - $incoming 2> /dev/null | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 186 187 # Only uncompress modules if not using udevd 188 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then 189 gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming" 232 190 fi 191 [ -x "$outdir" ] && StripExecutable $outdir "-$filename-" 233 192 counter=$(($counter+1)) 234 193 if [ "$counter" -ge "5" ] ; then … … 1808 1767 for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do 1809 1768 tar cf - ./$i 2>> $LOGFILE | (cd $bigdir ; tar xf -) || Die "PDDI can't copy $i->$bigdir" 1810 if [ "`du -sk $i | cut -f1`" -lt "$(($CHOPSIZE*2))" ] ; then1811 tar cf - $i 2>> $LOGFILE | (cd $bigdir ; tar xf -)1812 else1813 ChopUpAndCopyFile $i $bigdir $CHOPSIZE $BIGNO1814 BIGNO=$(($BIGNO+1))1815 fi1816 1769 done 1817 1770 for i in $EXTRA_MODS ; do … … 1819 1772 [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o.gz" >> $LOGFILE 1820 1773 for k in $j ; do 1821 if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then 1822 tar cf - $k 2>> $LOGFILE | (cd $bigdir ; tar xf -) 1823 else 1824 ChopUpAndCopyFile $k $bigdir $CHOPSIZE $BIGNO 1825 BIGNO=$(($BIGNO+1)) 1826 fi 1774 tar cf - $k 2>> $LOGFILE | (cd $bigdir ; tar xf -) 1827 1775 echo "Added failsafe module $k to ramdisk" >> $LOGFILE 1828 1776 done … … 2484 2432 trap "Aborted" SIGTERM 2485 2433 DONE="\r\t\t\t\t\t\t\t\tDone. " 2486 CHOPSIZE=2402487 BIGNO=02488 MAX_COMPRESSED_SIZE=13002489 2434 kernelpath="" 2490 2435 MONDO_ROOT=/var/cache/mondo … … 2559 2504 fi 2560 2505 2561 if [ "$#" -ge "2" ] ; then2562 if [ "$1" = "--max-compressed-size" ] ; then2563 MAX_COMPRESSED_SIZE=$22564 shift; shift2565 fi2566 fi2567 2568 2506 FLOPPY_WAS_MOUNTED="" 2569 2507 for mtpt in /media/floppy /mnt/floppy /floppy ; do -
branches/2.2.7/mindi/rootfs/sbin/install-additional-tools
r1902 r1989 50 50 fi 51 51 52 LogIt "Recombining large files..." 153 biggienumber=054 while [ -e "$mountdir/slice-$biggienumber.name" ] ; do55 stub=$mountdir/slice-$biggienumber56 biggiefname=`cat $stub.name`57 if [ -f $biggiefname ]; then58 LogIt "$biggiefname already exists - skipped" 159 biggienumber=$(($biggienumber+1))60 continue61 fi62 biggiefsize=`cat $stub.size`63 rm -f $stub.name $stub.size64 > /tmp/out.dat65 sliceno=066 while [ "$sliceno" -le "999" ] ; do67 slicefile=$stub.68 [ "$sliceno" -lt "100" ] && slicefile="$slicefile"069 [ "$sliceno" -lt "10" ] && slicefile="$slicefile"070 slicefile="$slicefile"$sliceno71 [ ! -e "$slicefile" ] && break72 cat $slicefile >> /tmp/out.dat73 rm -f $slicefile74 sliceno=$(($sliceno+1))75 done76 77 LogIt "$biggiefname ($biggiefsize KB) restored. $sliceno slices." 178 79 mkdir -p $biggiefname80 rmdir $biggiefname 2> /dev/null81 chmod +x /tmp/out.dat82 cp -f /tmp/out.dat $biggiefname83 rm -f /tmp/out.dat84 biggienumber=$(($biggienumber+1))85 done86 rm -f /slice*87 88 52 LogIt "Populating / with tar file content..." 1 89 53 -
branches/2.2.7/mindi/rootfs/sbin/post-init
r1983 r1989 151 151 if which mondorestore > /dev/null 2> /dev/null ; then 152 152 LogIt "Type 'mondorestore' to begin the restore/compare process." 1 153 loc=`which ISO 2> /dev/null`154 153 fi 155 154 fi -
branches/2.2.7/mondo/configure.in
r1930 r1989 120 120 AC_CHECK_FUNCS([bzero getcwd memmove memset mkdir mkfifo setenv strcasecmp strchr strerror strrchr strstr mkdtemp]) 121 121 122 AC_OUTPUT([Makefile src/Makefile src/common/Makefile src/mondoarchive/Makefile src/mondorestore/Makefile src/restore-scripts/Makefile src/restore-scripts/mondo/Makefile src/ restore-scripts/usr/Makefile src/restore-scripts/usr/bin/Makefile src/post-nuke.sample/Makefile src/post-nuke.sample/usr/Makefile src/post-nuke.sample/usr/bin/Makefile])122 AC_OUTPUT([Makefile src/Makefile src/common/Makefile src/mondoarchive/Makefile src/mondorestore/Makefile src/restore-scripts/Makefile src/restore-scripts/mondo/Makefile src/post-nuke.sample/Makefile src/post-nuke.sample/usr/Makefile src/post-nuke.sample/usr/bin/Makefile]) -
branches/2.2.7/mondo/src/restore-scripts/Makefile.am
r916 r1989 1 SUBDIRS = mondo usr1 SUBDIRS = mondo 2 2 3 3 restoreetcdir = $(pkgdatadir)/restore-scripts/etc -
branches/2.2.7/mondo/src/restore-scripts/mondo/Makefile.am
r1983 r1989 1 1 restoremondodir = $(pkgdatadir)/restore-scripts/mondo 2 restoremondo_SCRIPTS = ISO ask-me-a-question compare-subroutine-me \ 3 edit-mountlist grub-MR hack-fstab hack-grub hack-lilo hack-elilo \ 2 restoremondo_SCRIPTS = grub-MR hack-fstab hack-grub hack-lilo hack-elilo \ 4 3 label-partitions-as-necessary \ 5 4 make-me-bootable mount-me mount-subroutine-me raw-MR \ 6 restore-bigfiles-from-isostabgrub-me stablilo-me stabelilo-me \5 stabgrub-me stablilo-me stabelilo-me \ 7 6 stabraw-me unmount-me unmount-subroutine-me 8 7 format-and-kludge-vfat
Note:
See TracChangeset
for help on using the changeset viewer.