No exit with error if don't find sudoers line
This way, actions can be done with the result (eg. add the line,…).
This commit is contained in:
		
							parent
							
								
									4123be0626
								
							
						
					
					
						commit
						8bc6853b6c
					
				|  | @ -29,7 +29,6 @@ is_user() ## [[[ | |||
| 	fi | ||||
| } | ||||
| ## ]]] | ||||
| 
 | ||||
| is_sudoers_line() ## [[[ | ||||
| { | ||||
| 	line_to_check="${1}" | ||||
|  | @ -39,8 +38,8 @@ is_sudoers_line() ## [[[ | |||
| 		[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : ${line_to_check} line is available in sudo configuration." | ||||
| 		return "${SUCCESS}" | ||||
| 	else | ||||
| 		printf '\e[1;31m%-6s\e[m\n' "ERROR : ${line_to_check} was not found in sudo configuration." | ||||
| 		exit "${ERROR}" | ||||
| 		[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : ${line_to_check} was not found in sudo configuration." | ||||
| 		return "${ERROR}" | ||||
| 	fi | ||||
| } | ||||
| ## ]]] | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue