find a usable pty. Patch from Rob Leslie via Debian.
* Make sure bootlogd fflush() every line, even if asked not to flush
to disk using fdatasync(). Patch from Scott Gifford via Debian.
find a usable pty. Patch from Rob Leslie via Debian.
* Make sure bootlogd fflush() every line, even if asked not to flush
to disk using fdatasync(). Patch from Scott Gifford via Debian.
+ * Add compatibility code to handle old path "/etc/powerstatus" for a
+ while.
[ Werner Fink ]
* Add the comment from Andrea Arcangeli about the correct
[ Werner Fink ]
* Add the comment from Andrea Arcangeli about the correct
pwrstat = c;
close(fd);
unlink(PWRSTAT);
pwrstat = c;
close(fd);
unlink(PWRSTAT);
+ } else if ((fd = open(PWRSTAT_OLD, O_RDONLY)) >= 0) {
+ /* Path changed 2010-03-20. Look for the old path for a while. */
+ initlog(L_VB, "warning: found obsolete path %s, use %s instead",
+ PWRSTAT_OLD, PWRSTAT);
+ c = 0;
+ read(fd, &c, 1);
+ pwrstat = c;
+ close(fd);
+ unlink(PWRSTAT_OLD);
+ }
do_power_fail(pwrstat);
DELSET(got_signals, SIGPWR);
}
do_power_fail(pwrstat);
DELSET(got_signals, SIGPWR);
}
#define SHELL "/bin/sh" /* Default shell */
#define SULOGIN "/sbin/sulogin" /* Sulogin */
#define INITSCRIPT "/etc/initscript" /* Initscript. */
#define SHELL "/bin/sh" /* Default shell */
#define SULOGIN "/sbin/sulogin" /* Sulogin */
#define INITSCRIPT "/etc/initscript" /* Initscript. */
+#define PWRSTAT_OLD "/etc/powerstatus" /* COMPAT: SIGPWR reason (OK/BAD) */
#define PWRSTAT "/var/run/powerstatus" /* COMPAT: SIGPWR reason (OK/BAD) */
#if 0
#define PWRSTAT "/var/run/powerstatus" /* COMPAT: SIGPWR reason (OK/BAD) */
#if 0