Changeset 276 in MondoRescue for trunk/mondo/mondo
- Timestamp:
- Jan 3, 2006, 5:01:12 PM (18 years ago)
- Location:
- trunk/mondo/mondo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-devices.c
r274 r276 2018 2018 asprintf(&exclude_these_devices, 2019 2019 call_program_and_get_last_line_of_output 2020 (" cat /etc/fstab | tr -s '\t' ' '| grep -E '( (coda|ncpfs|nfs|smbfs|cifs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));2020 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'")); 2021 2021 asprintf(&result_sz, "%s", exclude_these_directories); 2022 2022 paranoid_free(exclude_these_devices); -
trunk/mondo/mondo/common/libmondo-filelist.c
r274 r276 490 490 // sort_file(filelist); // FIXME - filelist chopper sorts, so this isn't necessary 491 491 asprintf(&command, 492 " cat %s | getfacl --all-effective -P -2>> %s | gzip -c1 > %s 2>> %s",492 "getfacl --all-effective -P %s 2>> %s | gzip -c1 > %s 2>> %s", 493 493 filelist, MONDO_LOGFILE, facl_fname, MONDO_LOGFILE); 494 494 iamhere(command); -
trunk/mondo/mondo/common/libmondo-tools.c
r274 r276 173 173 file=$i/.directory; if [ -f \"$file\" ] ; then mv -f $file $file.old ; \ 174 174 awk '{if (index($0, \"rootimagesmindi\")) { while (length($0)>2) { getline;} ; } \ 175 else { print $0;};}' $file.old > $file ; fi ; done");175 else { print $0;};}' $file.old > $file ; fi ; done"); 176 176 run_program_and_log_output(tmp, 5); 177 177 paranoid_free(tmp); -
trunk/mondo/mondo/mondo-makefilelist
r274 r276 1 1 #!/bin/sh 2 # 3 # $Id$ 4 2 5 # 3 6 # mondo-makefilelist … … 82 85 res=`grep -v "Permission denied" $TMP/find.log` 83 86 if [ "$res" != "" ] ; then 84 cat $TMP/find.log 85 cat $TMP/find.log >> $LOGFILE 87 cat $TMP/find.log | tee -a $LOGFILE 86 88 fi 87 89 # include various directory _paths_ (not contents of dirs: that comes later) … … 105 107 106 108 # Patch from Andy Glass - 03/03/2002 107 for i in ` cat /etc/fstab | tr -s '\t' ' '| cut -d' ' -f2 | grep -v '-'` ; do109 for i in `tr -s '\t' ' ' < /etc/fstab | cut -d' ' -f2 | grep -v '-'` ; do 108 110 # End patch 109 # for i in `cat /etc/fstab | tr -s '\t' ' ' | cut -d' ' -f2` ; do110 111 grep -vx "$i/lost+found" $output | grep -vx $i"lost+found" > $output.MID 111 112 sync … … 113 114 done 114 115 # exclude .journal files (ext3) 115 for i in ` cat /etc/fstab | tr -s '\t' ' '| grep "ext3" | cut -d' ' -f2` ; do116 for i in `tr -s '\t' ' ' < /etc/fstab | grep "ext3" | cut -d' ' -f2` ; do 116 117 grep -vx "$i/\.journal" $output | grep -vx "$i\.journal" | grep -vx "$i\.autofsck" > $output.MID 117 118 sync -
trunk/mondo/mondo/mondorestore/mondo-rstr-compare.c
r171 r276 378 378 if (length_of_file(logfile) > 5) { 379 379 sprintf(command, 380 " cat %s | sed s/': \\\"'/\\|/| sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort | uniq | grep -vx \"dev/.*\" >> /tmp/changed.txt",380 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort | uniq | grep -vx \"dev/.*\" >> /tmp/changed.txt", 381 381 logfile); 382 382 system(command); -
trunk/mondo/mondo/restore-scripts/mondo/hack-lilo
r274 r276 15 15 GetOldFstabMountpoint() { 16 16 local res 17 res=` cat $old_fstab | tr -s '\t' ' '| grep "$1" | cut -d' ' -f2`17 res=`tr -s '\t' ' ' < $old_fstab | grep "$1" | cut -d' ' -f2` 18 18 # echo "old_fstab = $old_fstab" >> /dev/stderr 19 19 if [ "$res" = "" ] ; then 20 20 # echo "OK, resB" >> /dev/stderr 21 res=` cat $old_mountlist | tr -s '\t' ' '| grep " $1 " | cut -d' ' -f1`21 res=`tr -s '\t' ' ' < $old_mountlist | grep " $1 " | cut -d' ' -f1` 22 22 fi 23 23 echo "$res" … … 34 34 old_mountpoint=`GetOldFstabMountpoint $1` 35 35 # echo "old_mountpoint = $old_mountpoint" >> /dev/stderr 36 new_mountpoint=` cat $new_mountlist | tr -s '\t' ' '| grep " $old_mountpoint" | cut -d' ' -f1`36 new_mountpoint=`tr -s '\t' ' ' < $new_mountlist | grep " $old_mountpoint" | cut -d' ' -f1` 37 37 if [ "$new_mountpoint" = "" ] ; then 38 mtpt=` cat $new_mountlist | tr -s '\t' ' '| grep " $old_mountpoint " | cut -d' ' -f2`39 dev=` cat $new_mountlist | tr -s '\t' ' '| grep " $mtpt " | cut -d' ' -f1`38 mtpt=`tr -s '\t' ' ' < $new_mountlist | grep " $old_mountpoint " | cut -d' ' -f2` 39 dev=`tr -s '\t' ' ' < $new_mountlist | grep " $mtpt " | cut -d' ' -f1` 40 40 # echo "NEW_MP (A) = $dev" >> /dev/stderr 41 41 # else -
trunk/mondo/mondo/restore-scripts/mondo/stabelilo-me
r30 r276 86 86 87 87 WhatIsFirstDriveCalled() { 88 c at /tmp/mountlist.txt | cut -d' ' -f1\88 cut -d' ' -f1 /tmp/mountlist.txt \ 89 89 | sed s/[0-9]// | sed s/[0-9]// \ 90 | sort | uniq| head -n 190 | sort -u | head -n 1 91 91 } 92 92
Note:
See TracChangeset
for help on using the changeset viewer.