Thu Jul 5 17:33:59 2012 UTC ()
Pull up following revision(s) (requested by tsutsui in ticket #394):
	distrib/atari/floppies/common/dot.profile: revision 1.4
Simply use "mount -u" to (re)mount root file system read-write
rather than denoting it using temporary /tmp/.root_writable file,
because it will never be removed if root file system is on floppy.
Fixes PR port-atari/37470.
Should be pulled up to netbsd-6.


(riz)
diff -r1.3 -r1.3.10.1 src/distrib/atari/floppies/common/dot.profile

cvs diff -r1.3 -r1.3.10.1 src/distrib/atari/floppies/common/dot.profile (expand / switch to unified diff)

--- src/distrib/atari/floppies/common/dot.profile 2008/11/17 20:14:35 1.3
+++ src/distrib/atari/floppies/common/dot.profile 2012/07/05 17:33:59 1.3.10.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: dot.profile,v 1.3 2008/11/17 20:14:35 abs Exp $ 1# $NetBSD: dot.profile,v 1.3.10.1 2012/07/05 17:33:59 riz Exp $
2# 2#
3# Copyright (c) 1995 Jason R. Thorpe 3# Copyright (c) 1995 Jason R. Thorpe
4# Copyright (c) 1994 Christopher G. Demetriou 4# Copyright (c) 1994 Christopher G. Demetriou
5# All rights reserved. 5# All rights reserved.
6#  6#
7# Redistribution and use in source and binary forms, with or without 7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions 8# modification, are permitted provided that the following conditions
9# are met: 9# are met:
10# 1. Redistributions of source code must retain the above copyright 10# 1. Redistributions of source code must retain the above copyright
11# notice, this list of conditions and the following disclaimer. 11# notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright 12# 2. Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the 13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution. 14# documentation and/or other materials provided with the distribution.
@@ -37,36 +37,33 @@ PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ @@ -37,36 +37,33 @@ PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
37export PATH 37export PATH
38TERM=vt220 38TERM=vt220
39export TERM 39export TERM
40HOME=/ 40HOME=/
41export HOME 41export HOME
42OBLOCKSIZE=1k 42OBLOCKSIZE=1k
43export BLOCKSIZE 43export BLOCKSIZE
44EDITOR=ed 44EDITOR=ed
45export EDITOR 45export EDITOR
46 46
47umask 022 47umask 022
48 48
49makerootwritable() { 49makerootwritable() {
50 if [ ! -e /tmp/.root_writable ]; then 50 # note, only handles up to partition 'j'
51 # note, only handles up to partition 'j' 51 rootdev=/dev/$(sysctl -n kern.root_device)$(sysctl -n kern.root_partition | sed y/0123456789/abcdefghij/)
52 rootdev=/dev/$(sysctl -n kern.root_device)$(sysctl -n kern.root_partition | sed y/0123456789/abcdefghij/) 52 if ! mount -u $rootdev / ; then
53 if ! mount $rootdev / ; then 53 echo "Unable to mount $rootdev read-write"
54 echo "Unable to mount $rootdev read-write" 54 exit 1
55 exit 1 
56 fi 
57 cp /dev/null /tmp/.root_writable 
58 echo "Mounted $rootdev read-write" 
59 fi 55 fi
 56 echo "Mounted $rootdev read-write"
60} 57}
61 58
62if [ "X${DONEPROFILE}" = "X" ]; then 59if [ "X${DONEPROFILE}" = "X" ]; then
63 DONEPROFILE=YES 60 DONEPROFILE=YES
64 export DONEPROFILE 61 export DONEPROFILE
65 62
66 # set up some sane defaults 63 # set up some sane defaults
67 echo 'erase ^H, werase ^W, kill ^U, intr ^C' 64 echo 'erase ^H, werase ^W, kill ^U, intr ^C'
68 stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 65 stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
69 66
70 # mount root read write 67 # mount root read write
71 makerootwritable 68 makerootwritable
72 69