From 2d00e341300c697bed0b119c48452365fd2feff8 Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 30 Nov 2002 19:54:19 +0000 Subject: ia64: make link /boot->efi/boot relative. Approved by: re (murray) --- usr.sbin/sade/install.c | 7 ++++++- usr.sbin/sysinstall/install.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 5a66386..1b25046 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -1057,6 +1057,7 @@ installFilesystems(dialogMenuItem *self) char bootdir[FILENAME_MAX]; char efi_bootdir[FILENAME_MAX]; PartInfo *pi = (PartInfo *)c1->private_data; + char *p; if (pi->newfs && (!upgrade || !msgNoYes("You are upgrading - are you SURE you want to newfs /dev/%s?", c1->name))) command_shell_add(pi->mountpoint, "%s %s/dev/%s", pi->newfs_cmd, RunningAsInit ? "/mnt" : "", c1->name); @@ -1074,7 +1075,11 @@ installFilesystems(dialogMenuItem *self) strcat(bootdir, "/boot"); strcat(efi_bootdir, "/boot"); Mkdir(efi_bootdir); - symlink(efi_bootdir, bootdir); + /* Make a relative link. */ + p = &efi_bootdir[(RunningAsInit) ? 4 : 0]; + while (*p == '/') + p++; + symlink(p, bootdir); } #endif } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 5a66386..1b25046 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -1057,6 +1057,7 @@ installFilesystems(dialogMenuItem *self) char bootdir[FILENAME_MAX]; char efi_bootdir[FILENAME_MAX]; PartInfo *pi = (PartInfo *)c1->private_data; + char *p; if (pi->newfs && (!upgrade || !msgNoYes("You are upgrading - are you SURE you want to newfs /dev/%s?", c1->name))) command_shell_add(pi->mountpoint, "%s %s/dev/%s", pi->newfs_cmd, RunningAsInit ? "/mnt" : "", c1->name); @@ -1074,7 +1075,11 @@ installFilesystems(dialogMenuItem *self) strcat(bootdir, "/boot"); strcat(efi_bootdir, "/boot"); Mkdir(efi_bootdir); - symlink(efi_bootdir, bootdir); + /* Make a relative link. */ + p = &efi_bootdir[(RunningAsInit) ? 4 : 0]; + while (*p == '/') + p++; + symlink(p, bootdir); } #endif } -- cgit v1.1