Skip to content

Commit

Permalink
installer: Install the kernel used to install the system to /boot/ker…
Browse files Browse the repository at this point in the history
…nel.

We assume that the kernel the user booted the LiveCD/image with for
installing his system will be the kernel he wants to boot the system
from, too.
  • Loading branch information
Sascha Wildner committed Oct 27, 2010
1 parent 1f8c7ab commit b142014
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions share/installer/cmdnames.conf
Expand Up @@ -40,13 +40,15 @@ NEWFS_HAMMER=sbin/newfs_hammer
NEWFS_MSDOS=sbin/newfs_msdos
NFSD=sbin/nfsd
ROUTE=sbin/route
SYSCTL=sbin/sysctl
SWAPOFF=sbin/swapoff
SWAPON=sbin/swapon
UMOUNT=sbin/umount

AWK=usr/bin/awk
BUNZIP2=usr/bin/bunzip2
CHFLAGS=usr/bin/chflags
DIRNAME=usr/bin/dirname
GREP=usr/bin/grep
KILLALL=usr/bin/killall
SED=usr/bin/sed
Expand Down
19 changes: 19 additions & 0 deletions usr.sbin/installer/dfuibe_installer/fn_install.c
Expand Up @@ -603,6 +603,25 @@ fn_install_os(struct i_fn_args *a)
command_add(cmds, "%s%s 600 %smnt/var/log/install.log",
a->os_root, cmd_name(a, "CHMOD"), a->os_root);

/*
* XXX
* Move the kernel used for booting (UP or SMP) to /boot/kernel
* and remove the other kernel
*/
command_add(cmds,
"%s%s %smnt`%s%s $(%s%s -n kern.bootfile)` %smnt/boot/kernel",
a->os_root, cmd_name(a, "MV"),
a->os_root,
a->os_root, cmd_name(a, "DIRNAME"),
a->os_root, cmd_name(a, "SYSCTL"),
a->os_root);
command_add(cmds,
"%s%s -R noschg %smnt/boot/[A-Z][A-Z]*; %s%s -rf %smnt/boot/[A-Z][A-Z]*",
a->os_root, cmd_name(a, "CHFLAGS"),
a->os_root,
a->os_root, cmd_name(a, "RM"),
a->os_root);

/* Customize stuff here */
if(is_file("%susr/local/bin/after_installation_routines.sh", a->os_root)) {
command_add(cmds, "%susr/local/bin/after_installation_routines.sh",
Expand Down

0 comments on commit b142014

Please sign in to comment.