Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/diskparts-sysname/diskparts.new

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# set up any disk partitions
rfork e
if (! test -e /dev/sdctl)
	bind -a '#S' /dev

# set up any /dev/sd partitions
for(disk in /dev/sd[0-9A-Zabd-z]*) {
	if(test -f $disk/data && test -f $disk/ctl)
		disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
	for(part in $disk/plan9*)
		if(test -f $part)
			disk/prep -p $part >$disk/ctl >[2]/dev/null
}

sysname=`{cat /dev/sysname}

# set up any fs(3) partitions
if (test -e /env/sysname)
	if (test -r /cfg/$sysname/fsconfig && test -w /dev/fs/ctl)
		read -m /cfg/$sysname/fsconfig >/dev/fs/ctl

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].