# testing if the install_config_file function is available
# we don't want to spend time building udev if we can't install it properly

if  ! grep -q install_config_file /var/lib/sorcery/modules/libapi ;  then
    message  "${PROBLEM_COLOR}You don't have the latest stable Sorcery. Run
              \`sorcery update\`${DEFAULT_COLOR}"  &&
    return  1
fi                                                                                              &&

message "${MESSAGE_COLOR}"                                                                      &&
message "This update will move your current udev.rules to /etc/udev/rules.d/00-local.rules"        &&
message "As this is a major change, it won't happen unless\
 you answer y to the following question. ${DEFAULT_COLOR}"                                      &&

config_query  UDEV_UPDATE2  "Do you still wish to continue?"  n                                 &&

if  [  "$UDEV_UPDATE2"  ==  "n"  ];  then
  return  1
else
  message "A default udev.rules will be placed in /etc/udev/rules.d/50-default.rules" &&
  message "And some examples in /etc/udev/rules.d/rules.examples"
fi
