/sbin/mke2fs
- These are part of e2fsprogs.
+ /sbin/insmod.static
+ - This is part of module-init-tools. Note that Debian does NOT
+ package this, you have to build it yourself (or copy the file
+ from a Fedora machine which also works ...)
+
Optional
--------
(but you will need a package manager for your Linux distro)
AC_CHECK_PROG(APTITUDE,[aptitude],[aptitude],[no])
AC_CHECK_PROG(DPKG,[dpkg],[dpkg],[no])
-dnl Required e2fsprogs, libs.
+dnl Required programs, libraries.
+AC_PATH_PROG([INSMODSTATIC],[insmod.static],[no])
+if test "x$INSMODSTATIC" = "xno" ; then
+ AC_MSG_FAILURE([insmod.static program not found
+
+Is /sbin in your current path?
+
+Note that Debian/Ubuntu do not package this file from module-init-tools.
+Sorry, please fix your distribution. In the meantime you can copy
+/sbin/insmod.static from a Fedora machine.
+])
+fi
+AC_DEFINE_UNQUOTED([INSMODSTATIC],["$INSMODSTATIC"],
+ [Full path to the insmod.static program.])
+
AC_PATH_PROG([MKE2FS],[mke2fs],[no])
if test "x$MKE2FS" = "xno" ; then
AC_MSG_FAILURE([mke2fs program not found (is /sbin in your current path?)])
free_module_deps ();
/* Copy in insmod static binary. */
- cmd = xasprintf ("cp /sbin/insmod.static %s", dir);
+ cmd = xasprintf ("cp %s %s", INSMODSTATIC, dir);
if (verbose >= 2) fprintf (stderr, "%s\n", cmd);
r = system (cmd);
if (r == -1 || WEXITSTATUS (r) != 0)
error (EXIT_FAILURE, 0,
- "ext2_make_initrd: copy /sbin/insmod.static failed");
+ "ext2_make_initrd: copy %s failed", INSMODSTATIC);
free (cmd);
/* Copy in the init program, linked into this program as a data blob. */