- struct passwd *pw;
- char *dumpuser;
- disklist_t diskq;
- char *conffile;
- char *conf_diskfile;
- char *conf_infofile;
-
- safe_fd(-1, 0);
- safe_cd();
-
- set_pname("amcleanupdisk");
-
- /* Don't die when child closes pipe */
- signal(SIGPIPE, SIG_IGN);
-
- if(main_argc != 2)
- error("Usage: amcleanupdisk%s <confdir>", versionsuffix());
-
- config_name = main_argv[1];
-
- config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-
- conffile = stralloc2(config_dir, CONFFILE_NAME);
- if(read_conffile(conffile))
- error("errors processing config file \"%s\"", conffile);
- amfree(conffile);
-
- conf_diskfile = getconf_str(CNF_DISKFILE);
- if (*conf_diskfile == '/') {
- conf_diskfile = stralloc(conf_diskfile);
- } else {
- conf_diskfile = stralloc2(config_dir, conf_diskfile);
+ char *conf_infofile = config_dir_relative(getconf_str(CNF_INFOFILE));
+ if (open_infofile(conf_infofile) < 0) {
+ error(_("could not open info db \"%s\""), conf_infofile);
+ /*NOTREACHED*/