Hello! The attached patch allows /hurd or /hurd/init to be a symlink to an absolute path.
OK to apply? Thanks, Ludo’.
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index e73e4d3..30b54d3 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1993,94,95,96,97,98,99,2000,01,02,10 + Copyright (C) 1993,94,95,96,97,98,99,2000,01,02,10,11 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -222,6 +222,7 @@ diskfs_start_bootstrap () initname = exec_argv + 1; } + lookup_init: err = dir_lookup (root_pt, initname, O_READ, 0, &retry, pathbuf, &startup_pt); if (err) @@ -232,6 +233,13 @@ diskfs_start_bootstrap () free (exec_argv); assert_perror (err); /* XXX this won't reboot properly */ } + else if (retry == FS_RETRY_MAGICAL && pathbuf[0] == '/') + { + /* INITNAME is a symlink with an absolute target, so try again. */ + initname = strdupa (pathbuf); + goto lookup_init; + } + assert (retry == FS_RETRY_NORMAL); assert (pathbuf[0] == '\0');