Module Name: src Committed By: tsutsui Date: Sat Jun 26 00:38:16 UTC 2021
Modified Files: src/distrib/sun2/miniroot: install.md src/distrib/sun3/miniroot: install.md Log Message: Check if /tmp is writable to see whether the rootdev is already mounted. Creating a dummy /tmp/root_writable file and after mountroot and checking it on the second installation could be problematic if users retry to installation after reboot without reinstalling miniroot. Taken from amiga. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/sun2/miniroot/install.md cvs rdiff -u -r1.8 -r1.9 src/distrib/sun3/miniroot/install.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sun2/miniroot/install.md diff -u src/distrib/sun2/miniroot/install.md:1.8 src/distrib/sun2/miniroot/install.md:1.9 --- src/distrib/sun2/miniroot/install.md:1.8 Sat Jun 26 00:25:41 2021 +++ src/distrib/sun2/miniroot/install.md Sat Jun 26 00:38:16 2021 @@ -1,4 +1,4 @@ -# $NetBSD: install.md,v 1.8 2021/06/26 00:25:41 tsutsui Exp $ +# $NetBSD: install.md,v 1.9 2021/06/26 00:38:16 tsutsui Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -49,11 +49,10 @@ md_set_term() { md_makerootwritable() { # Just remount the root device read-write. - if [ ! -e /tmp/root_writable ]; then + if ! cp /dev/null /tmp/.root_writable >/dev/null 2>&1; then echo "Remounting root read-write..." mi_mount_kernfs mount -u -t ffs /kern/rootdev / - cp /dev/null /tmp/root_writable fi } Index: src/distrib/sun3/miniroot/install.md diff -u src/distrib/sun3/miniroot/install.md:1.8 src/distrib/sun3/miniroot/install.md:1.9 --- src/distrib/sun3/miniroot/install.md:1.8 Sat Jun 26 00:25:41 2021 +++ src/distrib/sun3/miniroot/install.md Sat Jun 26 00:38:16 2021 @@ -1,4 +1,4 @@ -# $NetBSD: install.md,v 1.8 2021/06/26 00:25:41 tsutsui Exp $ +# $NetBSD: install.md,v 1.9 2021/06/26 00:38:16 tsutsui Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -49,11 +49,10 @@ md_set_term() { md_makerootwritable() { # Just remount the root device read-write. - if [ ! -e /tmp/root_writable ]; then + if ! cp /dev/null /tmp/.root_writable >/dev/null 2>&1; then echo "Remounting root read-write..." mi_mount_kernfs mount -u /kern/rootdev / - cp /dev/null /tmp/root_writable fi }