2015-01-01 22:23:22 +01:00
|
|
|
Search $PATH for the shutdown binary instead of hard-coding /sbin/shutdown,
|
|
|
|
which isn't valid on NixOS (and a compatibility link on most other modern
|
|
|
|
distros anyway).
|
|
|
|
|
2017-04-02 19:00:02 +02:00
|
|
|
-- nckx <github@tobias.gr>
|
2016-04-28 05:19:02 +02:00
|
|
|
--- a/include/pathnames.h
|
|
|
|
+++ b/include/pathnames.h
|
2017-01-14 18:57:58 +01:00
|
|
|
@@ -53,7 +53,7 @@
|
|
|
|
#ifndef _PATH_LOGIN
|
2016-04-28 05:19:02 +02:00
|
|
|
#define _PATH_LOGIN "/bin/login"
|
2017-01-14 18:57:58 +01:00
|
|
|
#endif
|
2015-01-01 22:23:22 +01:00
|
|
|
-#define _PATH_SHUTDOWN "/sbin/shutdown"
|
2017-01-14 18:57:58 +01:00
|
|
|
+#define _PATH_SHUTDOWN "shutdown"
|
|
|
|
|
2016-04-28 05:19:02 +02:00
|
|
|
#define _PATH_TERMCOLORS_DIRNAME "terminal-colors.d"
|
|
|
|
#define _PATH_TERMCOLORS_DIR "/etc/" _PATH_TERMCOLORS_DIRNAME
|
|
|
|
--- a/sys-utils/rtcwake.c
|
|
|
|
+++ b/sys-utils/rtcwake.c
|
|
|
|
@@ -575,7 +575,7 @@ int main(int argc, char **argv)
|
2015-10-07 20:06:40 +02:00
|
|
|
arg[i++] = "now";
|
2015-01-01 22:23:22 +01:00
|
|
|
arg[i] = NULL;
|
2015-10-07 20:06:40 +02:00
|
|
|
if (!ctl.dryrun) {
|
2015-01-01 22:23:22 +01:00
|
|
|
- execv(arg[0], arg);
|
|
|
|
+ execvp(arg[0], arg);
|
|
|
|
warn(_("failed to execute %s"), _PATH_SHUTDOWN);
|
|
|
|
rc = EXIT_FAILURE;
|
2015-10-07 20:06:40 +02:00
|
|
|
}
|