diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh index b16d9eb..37ab33a 100755 --- a/create_arm_img_urpmi.sh +++ b/create_arm_img_urpmi.sh @@ -813,20 +813,17 @@ if ! [ -d "$CONFIG_PATH" ];then fi fi - if [ -e "$CONFIG_PATH/mageia4arm.cfg" ];then - info "using $CONFIG_PATH/mageia4arm.cfg as config" - . "$CONFIG_PATH/mageia4arm.cfg" - else - warning "Config file does not exists, do you want i copy template ? [Y|n] " - read yn - if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then - /usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$CONFIG_PATH/mageia4arm.cfg" - warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script" - exit 2 - fi - fi +if [ -e "$CONFIG_PATH/mageia4arm.cfg" ];then + info "using $CONFIG_PATH/mageia4arm.cfg as config" + . "$CONFIG_PATH/mageia4arm.cfg" else - + warning "Config file does not exists, do you want i copy template ? [Y|n] " + read yn + if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then + /usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$CONFIG_PATH/mageia4arm.cfg" + warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script" + exit 2 + fi fi if ! [ -z "$IMAGE_SIZE_P" ];then