- Timestamp:
- 03/08/2006 07:20:36 PM (19 years ago)
- Branches:
- experimental
- Children:
- 3a5c9cc
- Parents:
- c0aeabe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/func_validate_configs.sh
rc0aeabe r3bbf6d5 1 1 2 # $Id$ 2 # $Author$$Rev$$Date$ 3 3 4 #----------------------------# 4 5 validate_config() { # Are the config values sane (within reason) 5 6 #----------------------------# 6 7 : <<inline_doc 7 Validates the configuration parameters. The global var PROGNAME selects the 8 Validates the configuration parameters. The global var PROGNAME selects the 8 9 parameter list. 9 10 10 11 input vars: none 11 12 externals: color constants … … 31 32 local config_param 32 33 local validation_str 33 34 34 35 write_error_and_die() { 35 36 echo -e "\n${DD_BORDER}" … … 83 84 continue 84 85 fi 85 86 86 87 for config_param in LC_ALL LANG; do 87 88 [[ $1 = "1" ]] && echo "`eval echo $PARAM_VALS`" … … 89 90 # See it the locale values exist on this machine 90 91 [[ "`locale -a | grep -c ${!config_param}`" > 0 ]] && continue 91 92 92 93 # If you make it this far then there is a problem 93 94 write_error_and_die … … 101 102 [[ -z "${!config_param}" ]] && continue 102 103 [[ -e "${!config_param}" ]] && [[ -s "${!config_param}" ]] && continue 103 104 104 105 # If you make it this far then there is a problem 105 106 write_error_and_die
Note:
See TracChangeset
for help on using the changeset viewer.