diff mbox series

script: function name to "postfailure" instead of "failure"

Message ID 20240820153159.1886501-1-stefano.babic@swupdate.org
State Accepted
Headers show
Series script: function name to "postfailure" instead of "failure" | expand

Commit Message

Stefano Babic Aug. 20, 2024, 3:31 p.m. UTC
In case of failure, the scripts receive the funtion name "failure"
instead of "postfailure" as for Lua scripts and as set into the
documentation.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
Reported-by: Michael Glembotzki <m.glembo@gmail.com>
---
 handlers/shell_scripthandler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.34.1
diff mbox series

Patch

diff --git a/handlers/shell_scripthandler.c b/handlers/shell_scripthandler.c
index 5602b98b..abf1a28c 100644
--- a/handlers/shell_scripthandler.c
+++ b/handlers/shell_scripthandler.c
@@ -64,7 +64,7 @@  static int start_shell_script(struct img_type *img, void *data)
 		fnname="postinst";
 		break;
 	case POSTFAILURE:
-		fnname="failure";
+		fnname="postfailure";
 		break;
 	default:
 		/* no error, simply no call */