Changeset 794 in MondoRescue for trunk/mondo/mondo/common
- Timestamp:
- Sep 14, 2006, 1:05:18 AM (18 years ago)
- Location:
- trunk/mondo/mondo/common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-devices.c
r783 r794 2024 2024 { 2025 2025 return(call_program_and_get_last_line_of_output 2026 ("mount -t coda,ncpfs,nfs,smbfs,cifs, mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"));2026 ("mount -t coda,ncpfs,nfs,smbfs,cifs,afs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'")); 2027 2027 /* BERLIOS : Useless 2028 2028 asprintf(&exclude_these_devices, 2029 2029 call_program_and_get_last_line_of_output 2030 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs| mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));2030 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|afs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'")); 2031 2031 */ 2032 2032 } … … 2052 2052 #ifdef __FreeBSD__ 2053 2053 tmp = call_program_and_get_last_line_of_output 2054 ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs, mvfs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'");2054 ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs,afs,mvfs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"); 2055 2055 #else 2056 2056 tmp = call_program_and_get_last_line_of_output 2057 ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs -x mvfs | sed 's/ /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'");2057 ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs -x afs -x mvfs | sed 's/ /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"); 2058 2058 #endif 2059 2059 -
trunk/mondo/mondo/common/libmondo-fifo.c
r688 r794 55 55 /* @} - end of globalGroup */ 56 56 57 extern char *ps_options; 57 58 58 59 /** … … 129 130 } 130 131 sleep(2); 131 asprintf(&tmp, "ps wwax | grep \"%s\"", g_sz_call_to_buffer);132 asprintf(&tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer); 132 133 if (run_program_and_log_output(tmp, 2)) { 133 134 log_msg(2, "Warning - I think I failed to open tape, actually."); … … 135 136 paranoid_free(tmp); 136 137 g_tape_buffer_size_MB = bufsize; 137 /* BERLIOS: usless ? 138 strcmp(tmp, g_sz_call_to_buffer); 139 tmp[30] = '\0'; 140 */ 141 asprintf(&tmp, "ps wwax | grep buffer | grep -v grep"); 138 asprintf(&tmp, "ps %s | grep buffer | grep -v grep", ps_options); 142 139 if (run_program_and_log_output(tmp, 1)) { 143 140 fres = NULL; … … 161 158 sync(); 162 159 asprintf(&command, 163 "ps wwax | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'",160 "ps | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'", ps_options, 164 161 g_sz_call_to_buffer); 165 162 paranoid_free(g_sz_call_to_buffer); -
trunk/mondo/mondo/common/libmondo-filelist.c
r783 r794 1350 1350 // 2.6 has /sys as a proc-type thing -- must be excluded 1351 1351 asprintf(&tmp, 1352 "find %s -maxdepth %d -fstype mvfs -prune -o - path /proc -prune -o -path /sys -prune -o -path /dev/shm -prune -o -path /media/floppy -prune -o -type d -a -print > %s 2> /dev/null",1352 "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o -path /sys -prune -o -path /dev/shm -prune -o -path /media/floppy -prune -o -type d -a -print > %s 2> /dev/null", 1353 1353 dir, MAX_SKEL_DEPTH, skeleton_filelist); 1354 1354 #else 1355 1355 // On BSD, for example, /sys is the kernel sources -- don't exclude 1356 1356 asprintf(&tmp, 1357 "find %s -maxdepth %d -fstype mvfs -prune -o - path /proc -prune -o -type d -a -print > %s 2> /dev/null",1357 "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o -type d -a -print > %s 2> /dev/null", 1358 1358 dir, MAX_SKEL_DEPTH, skeleton_filelist); 1359 1359 #endif -
trunk/mondo/mondo/common/newt-specific.c
r783 r794 32 32 extern char *g_tmpfs_mountpt; 33 33 extern char *g_mondo_home; 34 extern char *ps_options; 34 35 35 36 extern void set_signals(int); … … 232 233 } 233 234 235 /** 236 * Kill any process containing the string @p str surrounded by spaces in its commandline. 237 */ 238 void kill_anything_like_this(char *str) { 239 240 char *tmp = NULL; 241 242 asprintf(&tmp,"kill `ps %s | grep \"" %s "\" | awk '{print $1;}' | grep -vx \"\\?\"`", ps_options, str); 243 run_program_and_log_output(tmp, TRUE); 244 paranoid_free(tmp); 245 } 234 246 235 247 /**
Note:
See TracChangeset
for help on using the changeset viewer.