#include <stdlib.h>
#include <unistd.h>
+#ifdef HAVE_SYS_REBOOT_H
+#include <sys/reboot.h>
+#endif
+
int
main (int argc, char *argv[])
{
fprintf (stderr, "***** initrd started up OK *****\n");
fprintf (stderr, "\n");
fprintf (stderr, "\n");
+
+#if defined(HAVE_SYS_REBOOT_H) && defined(RB_AUTOBOOT)
+ /* Try to reboot the system. */
+ reboot (RB_AUTOBOOT);
+ perror ("reboot");
+ /* Reboot attempt failed, fallthrough below. */
+#endif
+
fprintf (stderr, "expect to see a kernel panic below, that is normal\n");
fprintf (stderr, "\n");
fprintf (stderr, "\n");