this looks definitivelly wrong as you did it above un diferent form and you also overwrite ifcfg variable