[Zrouter-src] ZRouter.org: push to ZRouter profiles/SMALL_/files/etc/rc.d/moun...
zrouter-src at zrouter.org
zrouter-src at zrouter.org
Thu Sep 20 12:54:12 UTC 2012
details: http://zrouter.org/hg/zrouter//rev/eddcdc561685
changeset: 443:eddcdc561685
user: Aleksandr Rybalko <ray at ddteam.net>
date: Thu Sep 20 15:34:37 2012 +0300
description:
Autoconfig /tmp depend on files:
tmpfs.ko - mount tmpfs to /tmp
else md + ufs
else md + msdos.
diffstat:
profiles/SMALL_/files/etc/rc.d/mountcritlocal | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 127789042ff9 -r eddcdc561685 profiles/SMALL_/files/etc/rc.d/mountcritlocal
--- a/profiles/SMALL_/files/etc/rc.d/mountcritlocal Thu Sep 20 15:32:53 2012 +0300
+++ b/profiles/SMALL_/files/etc/rc.d/mountcritlocal Thu Sep 20 15:34:37 2012 +0300
@@ -12,9 +12,26 @@
{
# XXX: check TMPFS again
# XXX: get useful size: small for /etc or big for upgrade
- md=`/sbin/mdconfig -a -t malloc -s 1m`
- newfs -b 4096 -f 512 -n -o space /dev/${md} > /dev/null
- mount /dev/${md} /tmp
+ _IS_ETC_MOUNTED=0
+ if [ -f /boot/kernel/tmpfs.ko -a "x${TMPFS_ETC_ENABLED}" != "xno" ]; then
+ mount -t tmpfs tmpfs /tmp
+ _IS_ETC_MOUNTED=1
+ else
+ md=$(mdconfig -a -t malloc -s 1m)
+ if [ -f /boot/kernel/ufs.ko ]; then
+ newfs -b 4096 -f 512 -n -o space /dev/${md} > /dev/null
+ mount -t ufs /dev/${md} /tmp
+ _IS_ETC_MOUNTED=1
+ else
+ if [ -f /boot/kernel/msdosfs.ko ]; then
+ newfs_msdos -n 1 /dev/${md} > /dev/null
+ mount -t msdosfs /dev/${md} /tmp
+ _IS_ETC_MOUNTED=1
+ else
+ mdconfig -d ${md}
+ fi
+ fi
+ fi
mkdir -p /tmp/etc
for dir in account at audit cache db empty lib log mail msgs preserve \
More information about the Zrouter-src
mailing list