From 6bf418ae3cf85d71085e4297c201b150a518bef4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 7 Apr 2008 01:03:07 -0400 Subject: [PATCH] Reduce harmless warnings from run_script(). --- Makefile | 2 +- rpm.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 964c406..6d450d1 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ test : test-driver ./test-driver test.xml reset : ./razor - rm -rf install + sudo rm -rf install ./razor init clean : diff --git a/rpm.c b/rpm.c index 58e0960..ffb17eb 100644 --- a/rpm.c +++ b/rpm.c @@ -353,9 +353,7 @@ run_script(struct installer *installer, program = razor_rpm_get_indirect(installer->rpm, program_tag, NULL); script = razor_rpm_get_indirect(installer->rpm, script_tag, NULL); if (program == NULL && script == NULL) { - printf("no script or program for tags %d and %d\n", - program_tag, script_tag); - return -1; + return; } else if (program == NULL) { program = "/bin/sh"; } @@ -400,7 +398,8 @@ run_script(struct installer *installer, fprintf(stderr, "wait for child failed, %m"); return -1; } - printf("script exited with status %d\n", status); + if (status) + printf("script exited with status %d\n", status); } return 0; -- 1.7.1