@@ -, +, @@ --- src/rc/runscript.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) --- a/src/rc/runscript.c +++ a/src/rc/runscript.c @@ -1112,6 +1112,13 @@ runscript(int argc, char **argv) exit(EXIT_FAILURE); } + if (!exists(RC_SVCDIR "/softlevel")) { + fprintf(stderr, "OpenRC is not running. Running the script may result in unexpected\n" + "behavior. If you'd like to force doing so, please run:\n" + "\ttouch " RC_SVCDIR "/softlevel\n"); + exit(EXIT_FAILURE); + } + if (stat(argv[1], &stbuf) != 0) { fprintf(stderr, "runscript `%s': %s\n", argv[1], strerror(errno)); --