1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
Also try /tmp/exec as it's used for installation.
TODO: not used by d-i. Is it used by crosshurd?
---
libdiskfs/boot-start.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -126,8 +126,13 @@ diskfs_start_bootstrap ()
assert (_hurd_ports);
assert (_hurd_ports[INIT_PORT_CRDIR].port != MACH_PORT_NULL);
diskfs_exec = file_name_lookup (_SERVERS_EXEC, 0, 0);
- if (diskfs_exec == MACH_PORT_NULL)
- error (1, errno, "%s", _SERVERS_EXEC);
+ if (diskfs_exec == MACH_PORT_NULL)
+ {
+ /* Debian specifc work-around for install bootstrapping. */
+ diskfs_exec = file_name_lookup ("/tmp/exec", 0, 0);
+ if (diskfs_exec == MACH_PORT_NULL)
+ error (1, errno, "%s", _SERVERS_EXEC);
+ }
else
{
#ifndef NDEBUG
@@ -177,8 +182,15 @@ diskfs_start_bootstrap ()
&retry, pathbuf, &execnode);
if (err)
{
- error (0, err, "cannot set translator on %s", _SERVERS_EXEC);
- mach_port_deallocate (mach_task_self (), diskfs_exec_ctl);
+ /* If /servers/exec is not available (which is the case during
+ installation, try /tmp/exec as well. */
+ err = dir_lookup (root_pt, "/tmp/exec", O_NOTRANS, 0,
+ &retry, pathbuf, &execnode);
+ if (err)
+ {
+ error (0, err, "cannot set translator on %s", _SERVERS_EXEC);
+ mach_port_deallocate (mach_task_self (), diskfs_exec_ctl);
+ }
}
else
{
@@ -393,6 +405,10 @@ diskfs_execboot_fsys_startup (mach_port_
err = dir_lookup (rootport, _SERVERS_EXEC, flags|O_NOTRANS, 0,
&retry, pathbuf, real);
+ if (err)
+ /* Try /tmp/exec as well, in case we're installing. */
+ err = dir_lookup (rootport, "/tmp/exec", flags|O_NOTRANS|O_CREAT, 0,
+ &retry, pathbuf, real);
assert_perror (err);
assert (retry == FS_RETRY_NORMAL);
assert (pathbuf[0] == '\0');
|