From: espie Date: Sun, 19 Mar 2000 01:14:03 +0000 (+0000) Subject: populateusrlocal: create the right hierarchy under /usr/local X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b505c7cfc9b3f2c2ffbc6c86a6c7cf3d2b6545a3;p=openbsd populateusrlocal: create the right hierarchy under /usr/local right before unmounting the new system. Beats having mtree files around every package... --- diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index f252dccc906..e0a6b77159f 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.69 1999/10/16 19:01:21 deraadt Exp $ +# $OpenBSD: install.sh,v 1.70 2000/03/19 01:14:03 espie Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -529,6 +529,7 @@ q" | ed /mnt/etc/master.passwd 2> /dev/null dd if=/mnt/dev/urandom of=/mnt/var/db/host.random bs=1024 count=64 >/dev/null 2>&1 chmod 600 /mnt/var/db/host.random >/dev/null 2>&1 +populateusrlocal unmount_fs /tmp/fstab.shadow diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 038d74084ec..4fc201e0510 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sub,v 1.148 2000/02/25 01:39:13 krw Exp $ +# $OpenBSD: install.sub,v 1.149 2000/03/19 01:14:03 espie Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -2205,3 +2205,9 @@ __network_config_2 ;; esac } + +populateusrlocal() { + if [ -f /mnt/etc/mtree/BSD.local.dist ]; then + /mnt/usr/sbin/chroot /mnt /usr/sbin/mtree -Uedqn -p /usr/local -f /etc/mtree/BSD.local.dist >/dev/null + fi +} diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh index df532c526b9..3bfc7c399b1 100644 --- a/distrib/miniroot/upgrade.sh +++ b/distrib/miniroot/upgrade.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: upgrade.sh,v 1.11 1999/10/08 03:54:14 millert Exp $ +# $OpenBSD: upgrade.sh,v 1.12 2000/03/19 01:14:03 espie Exp $ # $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -296,6 +296,7 @@ esac md_installboot ${ROOTDISK} ) +populateusrlocal unmount_fs /tmp/fstab.shadow