mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	use rmdir
This commit is contained in:
		
							parent
							
								
									ca78e49cbd
								
							
						
					
					
						commit
						7c420a071c
					
				| @ -12,7 +12,7 @@ cleanup() | ||||
|   if [ ! -z $localmp ]; then  | ||||
|     umount -fl $localmp | ||||
|     if [ $? -eq 0 ];  then | ||||
|       rm $localmp -rf | ||||
|       rmdir $localmp | ||||
|     fi | ||||
|   fi | ||||
| } | ||||
|  | ||||
| @ -12,7 +12,7 @@ cleanup() | ||||
|   if [ ! -z $localmp ]; then  | ||||
|     umount $localmp | ||||
|     if [ $? -eq 0 ];  then | ||||
|       rm $localmp -rf | ||||
|       rmdir $localmp | ||||
|     fi | ||||
|   fi | ||||
| } | ||||
|  | ||||
| @ -12,13 +12,13 @@ cleanup() | ||||
|   if [ ! -z $snapshotdir ]; then  | ||||
|     umount $snapshotdir | ||||
|     if [ $? -eq 0 ];  then | ||||
|       rm $snapshotdir -rf | ||||
|       rmdir $snapshotdir | ||||
|     fi | ||||
|   fi | ||||
|   if [ ! -z $templatedir ]; then  | ||||
|     umount $templatedir | ||||
|     if [ $? -eq 0 ];  then | ||||
|       rm $templatedir -rf | ||||
|       rmdir $templatedir | ||||
|     fi | ||||
|   fi | ||||
| } | ||||
| @ -49,7 +49,7 @@ fi | ||||
| 
 | ||||
| mount $snapshoturl $snapshotdir | ||||
| if [ $? -ne 0 ]; then | ||||
|   rm -rf $snapshotdir | ||||
|   rmdir $snapshotdir | ||||
|   echo "5#can not mount $snapshoturl to $snapshotdir" | ||||
|   exit 0 | ||||
| fi | ||||
| @ -65,7 +65,7 @@ fi | ||||
| 
 | ||||
| mount $templateurl $templatedir | ||||
| if [ $? -ne 0 ]; then | ||||
|   rm -rf $templatedir | ||||
|   rmdir $templatedir | ||||
|   templatedir="" | ||||
|   cleanup | ||||
|   echo "7#can not mount $templateurl to $templatedir" | ||||
|  | ||||
| @ -11,13 +11,13 @@ cleanup() | ||||
|   if [ ! -z $snapshotdir ]; then  | ||||
|     umount $snapshotdir | ||||
|     if [ $? -eq 0 ];  then | ||||
|       rm $snapshotdir -rf | ||||
|       rmdir $snapshotdir | ||||
|     fi | ||||
|   fi | ||||
|   if [ ! -z $templatedir ]; then  | ||||
|     umount $templatedir | ||||
|     if [ $? -eq 0 ];  then | ||||
|       rm $templatedir -rf | ||||
|       rmdir $templatedir | ||||
|     fi | ||||
|   fi | ||||
| } | ||||
| @ -48,7 +48,7 @@ fi | ||||
| 
 | ||||
| mount $snapshoturl $snapshotdir | ||||
| if [ $? -ne 0 ]; then | ||||
|   rm -rf $snapshotdir | ||||
|   rmdir $snapshotdir | ||||
|   echo "5#can not mount $snapshoturl to $snapshotdir" | ||||
|   exit 0 | ||||
| fi | ||||
| @ -64,7 +64,7 @@ fi | ||||
| 
 | ||||
| mount $templateurl $templatedir | ||||
| if [ $? -ne 0 ]; then | ||||
|   rm -rf $templatedir | ||||
|   rmdir $templatedir | ||||
|   templatedir="" | ||||
|   cleanup | ||||
|   echo "7#can not mount $templateurl to $templatedir" | ||||
| @ -97,7 +97,7 @@ upgradeSnapshot() | ||||
|       exit 0 | ||||
|     fi | ||||
| 
 | ||||
|     rm -rf $parent | ||||
|     rm -f $parent | ||||
|   else | ||||
|     upgradeSnapshot $parent | ||||
|   fi | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user