while (fgets(buf, sizeof buf, infp) != NULL) {
if (strstr(buf, looking_for) != NULL) {
while (fgets(buf, sizeof buf, infp) != NULL) {
if (strstr(buf, looking_for) != NULL) {
- fwrite("#", 1, 1, outfp);
+ rv = fwrite("#", 1, 1, outfp);
- fwrite(buf, strlen(buf), 1, outfp);
+ rv = fwrite(buf, strlen(buf), 1, outfp);
snprintf(command, sizeof(command), "for x in 2 3 4 5 ; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/S79citadel ; done 2>/dev/null", initfile);
snprintf(command, sizeof(command), "for x in 2 3 4 5 ; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/S79citadel ; done 2>/dev/null", initfile);
snprintf(command, sizeof(command),"for x in 0 6 S; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/K30citadel ; done 2>/dev/null", initfile);
snprintf(command, sizeof(command),"for x in 0 6 S; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/K30citadel ; done 2>/dev/null", initfile);
fp = fopen(filename, "r+");
if (fp == NULL) return; /* Not there. Oh well... */
fp = fopen(filename, "r+");
if (fp == NULL) return; /* Not there. Oh well... */
sprintf(buf, "/bin/ls -l /etc/rc*.d/S*%s 2>/dev/null; "
"/bin/ls -l /etc/rc.d/rc*.d/S*%s 2>/dev/null",
sprintf(buf, "/bin/ls -l /etc/rc*.d/S*%s 2>/dev/null; "
"/bin/ls -l /etc/rc.d/rc*.d/S*%s 2>/dev/null",
sprintf(buf, "for x in /etc/rc*.d/S*%s; do mv $x `echo $x |sed s/S/K/g`; done >/dev/null 2>&1", mta);
sprintf(buf, "for x in /etc/rc*.d/S*%s; do mv $x `echo $x |sed s/S/K/g`; done >/dev/null 2>&1", mta);
fp = fopen(dialog_result, "r");
if (fp != NULL) {
if (fgets(str, sizeof buf, fp)) {
fp = fopen(dialog_result, "r");
if (fp != NULL) {
if (fgets(str, sizeof buf, fp)) {
if ((fd = creat(file_citadel_config, S_IRUSR | S_IWUSR)) == -1) {
display_error("setup: cannot open citadel.config");
if ((fd = creat(file_citadel_config, S_IRUSR | S_IWUSR)) == -1) {
display_error("setup: cannot open citadel.config");
- fwrite((char *) &config, sizeof(struct config), 1, fp);
+ rv = fwrite((char *) &config, sizeof(struct config), 1, fp);
if (yesno(question, 1)) {
sprintf(buf, "/bin/mv -f %s %s", new_filename, NSSCONF);
if (yesno(question, 1)) {
sprintf(buf, "/bin/mv -f %s %s", new_filename, NSSCONF);