gating: Use lazy unmount
This commit is contained in:
		
							parent
							
								
									a3bb519e91
								
							
						
					
					
						commit
						32ec53c728
					
				| @ -30,6 +30,12 @@ function running { | |||||||
|     echo -e "\n\n#### RUN: $1\n" |     echo -e "\n\n#### RUN: $1\n" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | # unmount the dirs lazily because sometimes some outside thing is still touching them | ||||||
|  | function umount_dirs { | ||||||
|  |     umount --lazy "$IMGDIR" | ||||||
|  |     umount --lazy "$ISODIR" | ||||||
|  | } | ||||||
|  | 
 | ||||||
| [ -e "$ISODIR" ] || mkdir "$ISODIR" | [ -e "$ISODIR" ] || mkdir "$ISODIR" | ||||||
| [ -e "$IMGDIR" ] || mkdir "$IMGDIR" | [ -e "$IMGDIR" ] || mkdir "$IMGDIR" | ||||||
| 
 | 
 | ||||||
| @ -43,8 +49,7 @@ function ks_only { | |||||||
|     test_ks |     test_ks | ||||||
| 
 | 
 | ||||||
|     status "Add kickstart" |     status "Add kickstart" | ||||||
|     umount "$IMGDIR" |     umount_dirs | ||||||
|     umount "$ISODIR" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function test_ks { | function test_ks { | ||||||
| @ -71,8 +76,7 @@ function ks_serial { | |||||||
|     test_ks_serial |     test_ks_serial | ||||||
| 
 | 
 | ||||||
|     status "Add kickstart and serial cmdline" |     status "Add kickstart and serial cmdline" | ||||||
|     umount "$IMGDIR" |     umount_dirs | ||||||
|     umount "$ISODIR" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function test_ks_serial { | function test_ks_serial { | ||||||
| @ -95,8 +99,7 @@ function new_volid { | |||||||
|     test_volid |     test_volid | ||||||
| 
 | 
 | ||||||
|     status "Use a new VOLID" |     status "Use a new VOLID" | ||||||
|     umount "$IMGDIR" |     umount_dirs | ||||||
|     umount "$ISODIR" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function test_volid { | function test_volid { | ||||||
| @ -118,8 +121,7 @@ function add_files { | |||||||
|     test_files |     test_files | ||||||
| 
 | 
 | ||||||
|     status "Add files" |     status "Add files" | ||||||
|     umount "$IMGDIR" |     umount_dirs | ||||||
|     umount "$ISODIR" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function test_files { | function test_files { | ||||||
| @ -139,8 +141,7 @@ function run_all { | |||||||
|     test_files |     test_files | ||||||
| 
 | 
 | ||||||
|     status "Use all the options" |     status "Use all the options" | ||||||
|     umount "$IMGDIR" |     umount_dirs | ||||||
|     umount "$ISODIR" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user