0002-Remove-the-check-for-devfs-in-initdiskless.patch

rumcic, 04/14/2010 09:31 PM

Download (1.38 KB)

View differences:

etc/rc.d/diskless
45 45
# Provide a function for normalizing the mounting of memory filesystems.
46 46
#   $1 = size
47 47
#   $2 = mount point
48
#   $3 = (optional) bytes-per-inode
49 48
mount_md() {
50
	if [ -n "$3" ]; then
51
		bpi="-i $3"
52
	fi
53
	/sbin/mount_mfs $bpi -s $1 swap $2
49
	/sbin/mount_mfs -s $1 swap $2
54 50
}
55 51

  
56 52
# If there is a global system configuration file, suck it in.
......
126 122
	fi
127 123
fi
128 124

  
129
if sysctl vfs.devfs > /dev/null 2>&1 ; then
130
	# we have DEVFS, no worries...
131
	true
132
elif (/bin/mkdir /dev/.diskless 2> /dev/null); then
133
	# if /dev is writable assume it has already been populated
134
	# via rc.d/diskless
135
	#
136
	rmdir /dev/.diskless
137
else
138
	(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp
139
	mount_md 4096 /dev 512
140
	(cd /; cpio -i -H newc -d < /tmp/dev.tmp)
141
	rm -f /tmp/dev.tmp
142
fi
143

  
144 125
# generate our hostname
145 126
#
146 127
if [ -z "`hostname -s`" ]; then
147
-