Changeset 3795 in MondoRescue
- Timestamp:
- Feb 15, 2024, 3:55:18 PM (2 months ago)
- Location:
- branches
- Files:
-
- 1 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/deplist.d/minimal.conf
r3366 r3795 120 120 /etc/conf.modules 121 121 /etc/modules.conf.local 122 /etc/depmod.d/hpvsa.conf 122 123 # Debian 7 123 124 /bin/kmod -
branches/3.0/mindi/mindi
r3360 r3795 39 39 TMPDIR=/tmp 40 40 41 EXTRA_SPACE=1 20000 # increase if you run out of ramdisk space42 BOOT_SIZE= 65600 # size of the boot disk41 EXTRA_SPACE=140000 # increase if you run out of ramdisk space 42 BOOT_SIZE=75600 # size of the boot disk 43 43 44 44 PROMPT_MAKE_CD_IMAGE="yes" … … 221 221 trap SIGHUP SIGTERM SIGTRAP SIGINT 222 222 [ "$MINDI_CACHE" != "" ] && rm -f $MINDI_CACHE/mindi*img $MINDI_CACHE/*gz $MINDI_CACHE/mindi.iso 223 [ "$minidir_root" != "" ] && rm -Rf $minidir_root/*224 223 Die "User abort." 225 224 } … … 655 654 if [ -e "$MINDI_TMP/post-nuke.tgz" ] ; then 656 655 LogAll "\nINFO: Incorporating post-nuke tarball" 657 old_pwd=`pwd` 658 cd "$bigdir" 659 tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log || LogAll "ERROR: when untarring post-nuke tarball" $MINDI_TMP/$$.log 660 cd "$old_pwd" 656 (cd "$bigdir" ; tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log ) || LogAll "ERROR: when untarring post-nuke tarball" $MINDI_TMP/$$.log 661 657 fi 662 658 if cp -f $MINDI_TMP/mondo*restore $bigdir/usr/bin 2>> $LOGFILE ; then … … 1498 1494 1499 1495 OfferToMakeBootableISO() { 1500 local i old_pwd1496 local i 1501 1497 if [ -z "$ISO_CMD" ]; then 1502 1498 LogAll "ERROR: Neither mkisofs nor genisoimage found, unable to make CD image" … … 1553 1549 cp $ISOLINUX $MINDI_TMP/iso/isolinux.bin 2>> $LOGFILE || Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso - did you run out of disk space?" 1554 1550 fi 1555 old_pwd=`pwd`1556 cd "$MINDI_TMP/iso"1557 1551 if [ "$ARCH" != "ia64" ] ; then 1558 1552 if [ _"$MONDO_SHARE" != _"" ]; then … … 1566 1560 cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE 1567 1561 fi 1568 $ISO_CMD -U $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log1569 else 1570 $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c images/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log1562 (cd $MINDI_TMP/iso ; $ISO_CMD -U $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log) 1563 else 1564 (cd $MINDI_TMP/iso ; $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c images/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log) 1571 1565 fi 1572 1566 if [ "$?" -ne "0" ] ; then … … 1579 1573 fi 1580 1574 rm -f $MINDI_TMP/mkisofs.log 1581 cd "$old_pwd"1582 1575 } 1583 1576 … … 2601 2594 Die "ERROR: Unable to copy $f to the target dir. Check your installation or McAfee presence" 2602 2595 else 2603 cp -Rdf $f . 2>&1 >> $LOGFILE 2596 if [ -d $f ]; then 2597 # Allow to suport target dirs being a symlink 2598 td=`basename $f` 2599 if [ ! -e $td ]; then 2600 mkdir -p $td 2601 fi 2602 cp -Rdf $f/* $td 2>&1 >> $LOGFILE 2603 else 2604 cp -df $f . 2>&1 >> $LOGFILE 2605 fi 2604 2606 fi 2605 2607 done … … 2637 2639 if [ $? -eq 0 ]; then 2638 2640 # We want to use the real mount and all the supported variants (nfs, cifs, ...) 2639 rm -f bin/mount2641 rm -f $mountpoint/bin/mount 2640 2642 fi 2641 2643 … … 2686 2688 tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "ERROR: Problem in /etc/udev analysis" $MINDI_TMP/$$.log 2687 2689 # This avoids NIC remapping if on another machine at restore time on Debian/Ubuntu at least 2688 rm -f ./etc/udev/rules.d/[z]*[0-9][0-9][-_]persistent-net.rules2690 rm -f $mountpoint/etc/udev/rules.d/[z]*[0-9][0-9][-_]persistent-net.rules 2689 2691 # Do not do it if it's a link (Ubuntu 64 bits #503) 2690 2692 if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [ ! -h "/lib64/udev" ]; then -
branches/3.3/MondoRescue/lib/MondoRescue/File.pm
r3742 r3795 156 156 if (defined $link) { 157 157 $link = mr_file_normalize($link,"$curdir/$dir"); 158 # It's a real symlink so handle it159 $files->{$f}->{"$curdir/$dir"} = 1 ;158 # It's a real symlink on a file so handle it 159 $files->{$f}->{"$curdir/$dir"} = 1 if ((not -d $link) && (not -d "/$link")); 160 160 if (substr($link,0,1) eq "/") { 161 161 $curdir = $link; … … 170 170 foreach my $k (keys %$h) { 171 171 foreach my $l (keys %$k) { 172 # Use $f as key as we affect sall the files172 # Use $f as key as we affect all the files 173 173 # found in recursion to the current managed file 174 174 $files->{$f}->{$l} = 1; -
branches/3.3/MondoRescue/t/01-read-all-link.t
r3772 r3795 7 7 # Create the structure for the tests 8 8 my $bd = tempdir( 9 CLEANUP => 19 #CLEANUP => 1 10 10 ); 11 11 … … 23 23 copy "/usr/bin/perl","usr/bin" || die "$!"; 24 24 chmod 0755,"usr/bin/perl"; 25 my $libc;26 25 foreach my $f (<"/lib/libc.so.[0-9]*">) { 27 26 copy "$f","usr/lib" || die "$!"; 28 $libc = $f;29 27 } 30 28 … … 57 55 ); 58 56 59 my $more = 1; 60 61 eval 62 { 63 require Test::More; 64 Test::More->import(); 65 no_plan(); 57 eval { 58 require Test; 59 Test->import(); 66 60 }; 67 # Test::More not found so simpler test68 61 if ($@) { 69 $more = 0; 70 eval { 71 require Test; 72 Test->import(); 73 }; 74 if ($@) { 75 require Test::Simple; 76 Test::Simple->import(); 77 } 62 require Test::Simple; 63 Test::Simple->import(); 78 64 } 79 65 plan(tests => 12); … … 97 83 sub myis { 98 84 99 if ($more eq 1) { 100 return(is(@_)); 101 } else { 102 my $p1 = shift; 103 my $p2 = shift; 104 my $p3 = shift; 105 print "# test $p3\n"; 106 return(ok($p1,$p2)); 85 my $p1 = shift; 86 my $p2 = shift; 87 my $p3 = shift; 88 print "# test $p3\n"; 89 return(ok($p1,$p2)); 107 90 } 108 }109 -
branches/3.3/ansible/inventory
r3747 r3795 47 47 #victoria2.home.musique-ancienne.org 48 48 49 [gitea] 50 www.mondorescue.org 51 49 52 [system] 50 53 www.mondorescue.org -
branches/3.3/ansible/roles/docker/tasks/main.yml
r3674 r3795 2 2 3 3 - name: Check mandatory packages installed 4 urpmi: name={{ item.pkg }} state=installed update_cache=yes no -recommends=yes4 urpmi: name={{ item.pkg }} state=installed update_cache=yes no_recommends=yes 5 5 with_items: 6 6 - { pkg: docker } -
branches/3.3/ansible/roles/git/tasks/main.yml
r3656 r3795 2 2 3 3 - name: Check that git is installed 4 urpmi: name=git state=installed no -recommends=yes4 urpmi: name=git state=installed no_recommends=yes 5 5 tags: git 6 6 -
branches/3.3/ansible/roles/httpd/tasks/main.yml
r3792 r3795 2 2 3 3 - name: Check that Apache is installed 4 urpmi: name=apache state=installed no -recommends=yes4 urpmi: name=apache state=installed no_recommends=yes 5 5 6 6 - name: Check that Apache mod_proxy is installed 7 urpmi: name=apache-mod_proxy state=installed no -recommends=yes7 urpmi: name=apache-mod_proxy state=installed no_recommends=yes 8 8 9 9 - name: Configure Apache log directories -
branches/3.3/ansible/roles/mageia-docker/tasks/main.yml
r3672 r3795 2 2 3 3 - name: Check mageia-docker mandatory packages installed 4 urpmi: name={{ item.pkg }} state=installed update_cache=yes no -recommends=yes4 urpmi: name={{ item.pkg }} state=installed update_cache=yes no_recommends=yes 5 5 with_items: 6 6 - { pkg: git } -
branches/3.3/ansible/roles/ntp/tasks/main.yml
r3674 r3795 2 2 3 3 - name: Check that ntp is installed 4 urpmi: name=ntp state=installed no -recommends=yes4 urpmi: name=ntp state=installed no_recommends=yes 5 5 tags: ntp 6 6 -
branches/3.3/ansible/roles/ntp/templates/ntp.conf.j2
r3747 r3795 28 28 # 29 29 driftfile /var/lib/ntp/drift 30 multicastclient 224.0.1.1 # listen on default 224.0.1.1 30 # Incorrect starting with mga9 31 #multicastclient 224.0.1.1 # listen on default 224.0.1.1 31 32 broadcastdelay 0.008 32 33 … … 51 52 # the administrative functions. 52 53 restrict 127.0.0.1 53 restrict ::154 #restrict ::1 -
branches/3.3/ansible/roles/pb/tasks/main.yml
r3670 r3795 2 2 3 3 - name: Check pb mandatory packages installed 4 urpmi: name={{ item.pkg }} state=installed update_cache=yes no -recommends=yes4 urpmi: name={{ item.pkg }} state=installed update_cache=yes no_recommends=yes 5 5 with_items: 6 6 - { pkg: createrepo } 7 - { pkg: apt } 7 # pending Mageia 9 resolution 8 #- { pkg: apt } 8 9 - { pkg: apt-mga } 9 10 - { pkg: dpkg } -
branches/3.3/ansible/roles/resolvconf/tasks/main.yml
r3655 r3795 2 2 3 3 - name: Check that resolvconf is installed 4 urpmi: name=resolvconf state=installed no -recommends=yes4 urpmi: name=resolvconf state=installed no_recommends=yes 5 5 tags: resolvconf 6 6 -
branches/3.3/ansible/roles/rsync/tasks/main.yml
r3667 r3795 2 2 3 3 - name: Check that rsync is installed 4 urpmi: name=rsync state=installed no -recommends=yes4 urpmi: name=rsync state=installed no_recommends=yes 5 5 tags: rsync 6 6 -
branches/3.3/ansible/roles/shorewall/tasks/main.yml
r3694 r3795 1 1 --- 2 2 - name: Install shorewall 3 urpmi: name=shorewall state=installed no -recommends=yes3 urpmi: name=shorewall state=installed no_recommends=yes 4 4 5 5 # Generate configuration -
branches/3.3/ansible/roles/shorewall/templates/shorewall.conf.j2
r3758 r3795 13 13 14 14 ############################################################################### 15 # 15 # V E R B O S I T Y 16 16 ############################################################################### 17 17 … … 19 19 20 20 ############################################################################### 21 # 21 # P A G E R 22 22 ############################################################################### 23 23 … … 25 25 26 26 ############################################################################### 27 # 27 # F I R E W A L L 28 28 ############################################################################### 29 29 … … 31 31 32 32 ############################################################################### 33 # 33 # L O G G I N G 34 34 ############################################################################### 35 35 # … … 52 52 LOGFILE=/var/log/messages 53 53 54 LOGFORMAT="Shorewall %s %s"54 LOGFORMAT="Shorewall:%s:%s:" 55 55 56 56 LOGTAGONLY=No … … 75 75 76 76 ############################################################################### 77 # L O C A T I O N O FF I L E S A N D D I R E C T O R I E S77 # L O C A T I O N O F F I L E S A N D D I R E C T O R I E S 78 78 ############################################################################### 79 79 … … 109 109 110 110 ############################################################################### 111 # 111 # D E F A U L T A C T I O N S / M A C R O S 112 112 ############################################################################### 113 113 … … 120 120 121 121 ############################################################################### 122 # R S H / R C PC O M M A N D S122 # R S H / R C P C O M M A N D S 123 123 ############################################################################### 124 124 … … 127 127 128 128 ############################################################################### 129 # F I R E W A L LO P T I O N S129 # F I R E W A L L O P T I O N S 130 130 ############################################################################### 131 131 … … 274 274 275 275 ############################################################################### 276 # 276 # P A C K E T D I S P O S I T I O N 277 277 ############################################################################### 278 278 … … 296 296 297 297 ################################################################################ 298 # 298 # P A C K E T M A R K L A Y O U T 299 299 ################################################################################ 300 300 -
branches/3.3/ansible/roles/smtp/defaults/main.yml
r3655 r3795 1 1 --- 2 2 smtp_role: client 3 admin_email: bruno@victoria.frmug.org 4 include_vars: opendkim_vars.yml -
branches/3.3/ansible/roles/smtp/tasks/main.yml
r3674 r3795 2 2 3 3 - name: Check that postfix is installed 4 urpmi: name=postfix state=installed no -recommends=yes4 urpmi: name=postfix state=installed no_recommends=yes 5 5 tags: smtp 6 6 -
branches/3.3/ansible/roles/svn/tasks/main.yml
r3773 r3795 2 2 3 3 - name: Check that subversion is installed 4 urpmi: name=subversion-server state=installed no -recommends=yes4 urpmi: name=subversion-server state=installed no_recommends=yes 5 5 tags: subversion 6 6 -
branches/3.3/ansible/roles/sympa/tasks/main.yml
r3696 r3795 2 2 3 3 - name: Check that mandatory packages are installed 4 urpmi: name={{ item }} state=installed no -recommends=yes4 urpmi: name={{ item }} state=installed no_recommends=yes 5 5 with_items: 6 6 - mariadb -
branches/3.3/ansible/roles/system/tasks/main.yml
r3674 r3795 18 18 19 19 - name: Check that sshd is installed 20 urpmi: name=openssh-server state=installed update_cache=yes no -recommends=yes20 urpmi: name=openssh-server state=installed update_cache=yes no_recommends=yes 21 21 tags: system 22 22 … … 61 61 62 62 - name: Check that sshutout is installed 63 urpmi: name=sshutout state=installed update_cache=yes no -recommends=yes63 urpmi: name=sshutout state=installed update_cache=yes no_recommends=yes 64 64 tags: system 65 65 -
branches/3.3/ansible/roles/trac/tasks/main.yml
r3752 r3795 2 2 3 3 - name: Check that docutils is installed 4 urpmi: name=python-docutils state=installed no -recommends=yes4 urpmi: name=python-docutils state=installed no_recommends=yes 5 5 tags: trac 6 6 7 7 - name: Check that pip is installed 8 urpmi: name=python-pip state=installed no -recommends=yes8 urpmi: name=python-pip state=installed no_recommends=yes 9 9 tags: trac 10 10 11 11 - name: Install trac with fcgi 12 urpmi: name=trac-fcgi state=installed no -recommends=yes12 urpmi: name=trac-fcgi state=installed no_recommends=yes 13 13 tags: trac 14 14 … … 18 18 # Do it only at upgrade of trac: 19 19 - name: Install trac plugins 20 command: pip install --no-deps --upgrade -t /usr/lib/python 2.7/site-packages/ {{ item }}20 command: pip install --no-deps --upgrade -t /usr/lib/python3.10/site-packages/ {{ item }} 21 21 with_items: 22 - TracAccountManager22 #- TracAccountManager # Installed from trunk 23 23 - TracTags 24 24 - TracRobotsTxt -
branches/3.3/ansible/roles/urpmi/files/addmedia
r3793 r3795 1 1 #!/bin/bash 2 2 urpmi.removemedia -a 3 urpmi.addmedia --distrib mga http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/ 8/x86_643 urpmi.addmedia --distrib mga http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/9/x86_64 -
branches/3.3/ansible/roles/urpmi/tasks/main.yml
r3667 r3795 11 11 12 12 - name: Check mandatory packages installed 13 urpmi: name={{ item.pkg }} state=installed update_cache=yes no -recommends=yes13 urpmi: name={{ item.pkg }} state=installed update_cache=yes no_recommends=yes 14 14 with_items: 15 15 - { pkg: bind-utils } -
branches/3.3/ansible/roles/vsftpd/tasks/main.yml
r3674 r3795 2 2 3 3 - name: Check that vsftpd is installed 4 urpmi: name=vsftpd state=installed no -recommends=yes4 urpmi: name=vsftpd state=installed no_recommends=yes 5 5 tags: vsftpd 6 6 -
branches/3.3/ansible/site.yml
r3749 r3795 5 5 - import_playbook: ntp.yml 6 6 - import_playbook: smtp.yml 7 - import_playbook: trac.yml7 #- import_playbook: trac.yml 8 8 - import_playbook: vsftpd.yml 9 9 - import_playbook: svn.yml -
branches/3.3/mindi/mindi
r3785 r3795 302 302 local outdir incoming counter d found tdir templog 303 303 outdir=$1 304 noof_lines=$2 305 counter=$3 304 306 templog=$MINDI_TMP/$$.log 305 307 mkdir -p $outdir 306 308 incoming=`ReadLine` 307 counter=$3308 309 > $templog 309 310 310 311 while [ "$incoming" != "" ] ; do 311 if [ "$3" = "1" ]; then 312 LogFile "DEBUG: Handling $incoming" 313 if [ "$noof_lines" != "0" ]; then 312 314 counter=$(($counter+1)) 313 LogProgress $counter $ 2315 LogProgress $counter $noof_lines 314 316 fi 315 317 # Non absolute file names should not arrive till here => skipped 316 318 if [ `echo "$incoming" | cut -c1` != '/' ]; then 317 Log File "WARNING: Unable to handle non-full pathname $incoming"319 LogAll "WARNING: Unable to handle $incoming" 318 320 incoming=`ReadLine` 319 321 continue 320 322 fi 323 if [ -e "$incoming" ]; then 324 LogFile "DEBUG: Adding $incoming" 325 listfile="$listfile $incoming" 326 fi 327 incoming=`ReadLine` 328 done 329 330 LogAll "Creating mindi tar file" 331 tar cf - -C / $listfile 2> $templog | (cd "$outdir" ; tar xf -) # || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $templog 332 } 333 334 bidon() { 335 321 336 # no parent directory of incoming should be a link, copy is not possible in that case 322 337 d=`dirname "$incoming"` 323 338 found="false" 324 339 while [ $d != "/" -a $found = "false" ]; do 325 [ -h "$d" ] && found="true" 340 if [ -h "$d" ]; then 341 found="true" 342 LogFile "WARNING: skipping $d as link" 343 incoming=`ReadLine` 344 continue 345 fi 326 346 d=`dirname "$d"` 327 347 done 348 328 349 if [ -d "$incoming" -a ! -h "$incoming" ]; then 329 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0 0 350 LogFile "DEBUG: Finding in $incoming" 351 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0 0 330 352 elif [ -e "$incoming" ] && [ $found = "false" ]; then 331 353 if [ ! -h "$incoming" ]; then 354 LogFile "DEBUG: Tarring $incoming" 332 355 tar cf - -C / $incoming 2> $templog | (cd "$outdir" ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $templog 333 356 else 357 LogFile "DEBUG: Copying $incoming" 334 358 tdir=`dirname "$incoming"` 335 359 if [ ! -e "$outdir/$tdir" ]; then … … 340 364 # Only uncompress modules if not using udevd 341 365 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then 342 gunzip -f $outdir/$incoming || LogAll "WARNING: Cannot gunzip $outdir/$incoming"366 gunzip -f $outdir/$incoming || LogAll "WARNING: Cannot gunzip $outdir/$incoming" 343 367 fi 344 368 [ -x "$outdir" ] && StripExecutable $outdir 345 369 fi 346 370 incoming=`ReadLine` 347 done348 371 } 349 372 … … 356 379 done 357 380 echo $r 358 }359 360 361 DropOptimizedLibraries() {362 local outdir filelist list_of_optimized_libraries optimized_lib_name vanilla_lib_name reason msg resolved res363 filelist=$1364 outdir=$2365 366 list_of_optimized_libraries=`grep "lib/i[5-7]86/" $filelist`367 if [ "$list_of_optimized_libraries" = "" ] ; then368 return 0369 fi370 echo -en "Dropping i686-optimized libraries if appropriate"371 for optimized_lib_name in $list_of_optimized_libraries ; do372 echo -en "."373 reason=""374 vanilla_lib_name=`echo "$optimized_lib_name" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'`375 echo "$vanilla_lib_name" >> $filelist376 LogFile "INFO: Adding $vanilla_lib_name to filelist"377 mkdir -p $outdir$optimized_lib_name > /dev/null 2> /dev/null378 rmdir $outdir$optimized_lib_name > /dev/null 2> /dev/null379 380 # This may return multiple files381 for resolved in `mr-read-all-link $vanilla_lib_name`; do382 LogFile "INFO: Adding as deps $resolved to filelist"383 vanilla_resolved_name=`echo "$resolved" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'`384 if [ "$vanilla_resolved_name" != "$resolved" ]; then385 mkdir -p $outdir$resolved> /dev/null 2> /dev/null386 rmdir $outdir$resolved > /dev/null 2> /dev/null387 ln -sf $vanilla_resolved_name $outdir$resolved388 LogFile "INFO: Excluding deps $resolved"389 grep -Fvx "$resolved" "$filelist" > $filelist.tmp390 LogFile "INFO: Replacing it with $vanilla_resolved_name"391 echo "$vanilla_resolved_name" >> $filelist.tmp392 mv -f $filelist.tmp $filelist393 fi394 done395 done396 $AWK '{ print $1; }' $filelist | sort -u > $filelist.tmp397 mv -f $filelist.tmp $filelist398 echo -e "$DONE"399 381 } 400 382 … … 2350 2332 2351 2333 PrepareBigDir() { 2352 local needlist diskdir res i j k lines lfiles includefile ti 2334 local needlist diskdir res i j k lines lfiles includefile ti templog 2353 2335 2354 2336 rm -f $MINDI_CACHE/mindi.iso 2355 needlist=$MINDI_TMP/what-we-need.txt 2356 mkdir -p $bigdir/usr/bin 2357 mkdir -p $bigdir/usr/sbin 2358 includefile=$MINDI_TMP/$$.includefile.txt 2359 2360 lfiles=`ls $DEPLIST_DIR/* | grep -v /minimal` 2337 mkdir -p $targetdir 2338 templog=$MINDI_TMP/$$.log 2339 needlist=$MINDI_TMP/kernel-modules.conf 2340 mkdir -p $bigdir/usr/bin $bigdir/usr/sbin $bigdir/tmp 2341 # Generated file 2342 includefile=$MINDI_TMP/include-modules.conf 2343 2344 lfiles=`ls $DEPLIST_DIR/* | grep -Ev '/minimal|/udev|/drbd'` 2361 2345 if [ -e "$DEPLIST_FILE" ]; then 2362 2346 lfiles="$DEPLIST_FILE $lfiles" 2363 2347 fi 2364 lines=`grep -vx " *#.*" $lfiles | grep -vx "" | wc -l`2365 2348 ParseModprobeForIncludes $includefile 2366 lines=$(($lines+`cat $includefile | wc -l`)) 2367 cat $lfiles $includefile | GenerateGiantDependencyList $needlist $lines 2368 res=$? 2349 ListKernelModulePaths > $needlist 2350 for f in $lfiles $includefile $needlist; do 2351 CopyFromConf $f $targetdir 2352 done 2369 2353 rm -f $includefile 2370 ListKernelModulePaths >> $needlist 2371 if [ "$res" -ne "0" ] ; then 2372 Die "You have $res files present in dependency list\nbut absent from filesystem." 2373 fi 2374 mkdir -p $bigdir/tmp 2354 2375 2355 if [ _"$MONDO_SHARE" != _"" ]; then 2376 2356 # TODO: no reason to have the cfg file stored twice … … 2383 2363 2384 2364 [ -d "/mnt/.boot.d" ] && echo "GENTOO" > $bigdir/tmp/DUMBASS-GENTOO 2385 DropOptimizedLibraries $needlist $bigdir2386 echo -en "INFO: Assembling dependency files"2387 2388 CopyDependenciesToDirectory < $needlist $bigdir `wc -l $needlist` 12389 rm -f $needlist2390 echo -e "$DONE"2391 2365 2392 2366 # also copy io.sys and msdos.sys, if we can find them … … 2419 2393 done 2420 2394 if [ -e "$MONDO_SHARE/restore-scripts" ]; then 2395 mkdir -p $bigdir/usr/bin $bigdir/etc 2421 2396 cp -Rdf $MONDO_SHARE/restore-scripts/mondo/* $bigdir/usr/bin 2>> $LOGFILE 2422 2397 [ $? -ne 0 ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" … … 2473 2448 PrepareBootDir 2474 2449 2450 LogFile "---------------------------" 2451 LogFile "Content of initial bigdir:" 2452 LogFile "---------------------------- " 2453 (cd "$bigdir" ; ls -Rla ) >> $LOGFILE 2454 LogFile "---------------------------" 2475 2455 } 2476 2456 … … 2714 2694 conf=$1 2715 2695 mp=$2 2716 echo -en "INFO: Gathering dependencies of $conf.conf..." 2717 LogFile "INFO: Gathering dependencies of $conf.conf..." 2718 lis2=`grep -Ev '^#' $DEPLIST_DIR/$conf.conf | sort -u` 2696 if [ ! -e $conf ]; then 2697 # Invoked with a conf file short name fixing... 2698 conf="$DEPLIST_DIR/$1.conf" 2699 fi 2700 if [ ! -e $conf ]; then 2701 LogAll "Unable to find conf file $conf please report upstream" 2702 return 2703 fi 2704 bconf=`basename $conf .conf` 2705 echo -en "INFO: Gathering dependencies of $bconf..." 2706 LogFile "INFO: Gathering dependencies of $conf..." 2707 lis2=`grep -Ev '^#' $conf | sort -u` 2719 2708 noof_lines=`echo $lis2 | wc -w` 2720 2709 progress=0 2710 LogFile "DEBUG: targetdir: `ls -l $mp/`" 2711 LogFile "DEBUG: lis2=$lis2" 2721 2712 # Get only the files which exist in that list 2722 2713 # and potentially their symlink structure 2723 2714 # put apart directories for later handling 2715 touch $MINDI_TMP/$bconf.lis $MINDI_TMP/$bconf.lis2 2724 2716 for f in $lis2; do 2725 2717 if [ -d $f ]; then 2726 2718 for g in `find $f`; do 2727 echo $g >> $MINDI_TMP/$ conf.lis2728 LocateDeps $g >> $MINDI_TMP/$ conf.lis22719 echo $g >> $MINDI_TMP/$bconf.lis 2720 LocateDeps $g >> $MINDI_TMP/$bconf.lis2 2729 2721 done 2730 2722 lis3="$lis3 $f" 2731 2723 else 2732 2724 if [ -r $f ]; then 2733 echo $f >> $MINDI_TMP/$ conf.lis2734 LocateDeps $f >> $MINDI_TMP/$ conf.lis22725 echo $f >> $MINDI_TMP/$bconf.lis 2726 LocateDeps $f >> $MINDI_TMP/$bconf.lis2 2735 2727 fi 2736 2728 fi … … 2738 2730 LogProgress $progress $noof_lines 2739 2731 done 2740 echo -e "$DONE"2741 LogAll "INFO: Processing all dependencies links for $conf.conf..."2732 LogFile "DEBUG: lis3=$lis3" 2733 #LogAll "INFO: Processing all dependencies links for $conf..." 2742 2734 # And their deps except dirs 2743 lines=`sort -u $MINDI_TMP/$ conf.lis $MINDI_TMP/$conf.lis2`2744 rm -f $MINDI_TMP/$ conf.lis22735 lines=`sort -u $MINDI_TMP/$bconf.lis $MINDI_TMP/$bconf.lis2` 2736 rm -f $MINDI_TMP/$bconf.lis2 2745 2737 finallist="" 2746 2738 # Remove directories from the list, as cp will create them anyway … … 2748 2740 # recent bash says that -d is true for a link to a dir ! 2749 2741 for f in $lines; do 2742 LogFile "DEBUG: f=$f" 2750 2743 if [ -e "$f" -a ! -d "$f" ] || [ -h "$f" ]; then 2744 LogFile "DEBUG: Test OK" 2751 2745 # Do not overwrite files already in destination (avoid using option -n of cp not portable) 2752 2746 if [ ! -e "$mp/$f" ]; then 2753 2747 finallist="$finallist $f" 2748 LogFile "DEBUG: Creating $mp/$f" 2749 else 2750 LogFile "DEBUG: Target exist `ls -al $mp/$f`" 2754 2751 fi 2755 2752 fi 2756 2753 done 2754 LogFile "DEBUG: finallist=$finallist" 2757 2755 # But adds the directory useful in $lis3 2758 2756 fnllist=`echo $finallist $lis3 | tr ' ' '\n' | sort -u | tr '\n' ' '` 2759 LogFile "INFO: Copying $conf related files with cp -a --parents $fnllist -t $mp/" 2760 cp -a --parents $fnllist -t $mp/ 2> $templog || LogAll "WARNING: Problem in $conf analysis" $templog 2761 rm -f $MINDI_TMP/$conf.lis 2757 echo -e "$DONE" 2758 if [ _"$fnllist" != _"" ] && [ _"$fnllist" != _" " ]; then 2759 LogFile "INFO: Copying $conf related files with cp -a --parents $fnllist -t $mp/" 2760 cp -a --parents $fnllist -t $mp/ 2>$templog || LogAll "WARNING: Problem in $conf analysis" $templog 2761 fi 2762 rm -f $MINDI_TMP/$bconf.lis 2762 2763 } 2763 2764 … … 2772 2773 > $templog 2773 2774 2774 mkdir -p $targetdir2775 2775 # Check whether /lib64 or /lib or /sbin or /bin is a link and if so explicitly create one in rootfs (Fedora 17 crazyness) 2776 2776 for d in bin sbin lib lib64; do … … 2778 2778 thelink=`readlink /$d` 2779 2779 mkdir -p $targetdir/$thelink || LogAll "ERROR: Unable to create $thelink in $targetdir" 2780 mv $targetdir/$d/* $targetdir/$d/.??* $targetdir/$thelink 2> /dev/null2780 mv $targetdir/$d/* $targetdir/$d/.??* $targetdir/$thelink 2781 2781 if [ -d "$targetdir/$d" -a ! -h "$targetdir/$d" ]; then 2782 2782 rmdir $targetdir/$d … … 3030 3030 3031 3031 mkdir -p $targetdir/proc 3032 cp -a $MY_FSTAB $targetdir/tmp 3032 3033 LogFile "---------------------------" 3033 3034 LogFile "Content of initial targetdir:" -
branches/3.3/mondo/src/common/libmondo-archive.c
r3777 r3795 631 631 if (strcmp(bootldr_ver,"") == 0) { 632 632 mr_free(bootldr_ver); 633 bootldr_ver = call_program_and_get_last_line_of_output("grub2-install --version ");633 bootldr_ver = call_program_and_get_last_line_of_output("grub2-install --version 2> /dev/null"); 634 634 } 635 635 } else if (bkpinfo->boot_loader == 'E') {
Note:
See TracChangeset
for help on using the changeset viewer.