From: Kristian Høgsberg Date: Mon, 7 Apr 2008 05:03:07 +0000 (-0400) Subject: Reduce harmless warnings from run_script(). X-Git-Tag: 0.1~165 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=6bf418ae3cf85d71085e4297c201b150a518bef4;p=razor.git Reduce harmless warnings from run_script(). --- 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;