From 4f803704b1e7ee1e994e713f4c6cab07fb4dbdb7 Mon Sep 17 00:00:00 2001 From: Wataru Ishida Date: Fri, 13 Jul 2018 14:59:47 -0700 Subject: [PATCH] rfs: fix bug that bash doesn't return on error bash doesn't respect -ex flags when it is not written in the first line Signed-off-by: Wataru Ishida --- tools/onlrfs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/onlrfs.py b/tools/onlrfs.py index 58f3dc75..46749d3b 100755 --- a/tools/onlrfs.py +++ b/tools/onlrfs.py @@ -389,8 +389,7 @@ class OnlRfsBuilder(object): script = os.path.join(dir_, "tmp/configure.sh") with open(script, "w") as f: os.chmod(script, 0700) - f.write(""" -#!/bin/bash -ex + f.write("""#!/bin/bash -ex /bin/echo -e "#!/bin/sh\\nexit 101" >/usr/sbin/policy-rc.d chmod +x /usr/sbin/policy-rc.d export DEBIAN_FRONTEND=noninteractive