127 |
rc_print "Mounting tmpfs at ${svcdir} ..." |
rc_print "Mounting tmpfs at ${svcdir} ..." |
128 |
mount -n -t tmpfs tmpfs "${svcdir}" -o rw,mode=0644,size="${svcsize}"k |
mount -n -t tmpfs tmpfs "${svcdir}" -o rw,mode=0644,size="${svcsize}"k |
129 |
evaluate_retval |
evaluate_retval |
130 |
|
|
131 |
|
## /run /tmp /var/lock |
132 |
|
for i in /run /tmp /var/lock |
133 |
|
do |
134 |
|
if [ -d ${i} ] |
135 |
|
then |
136 |
|
rc_print "Mounting tmpfs at ${i} ..." |
137 |
|
mount -n -t tmpfs tmpfs ${i} -o rw,nosuid,nodev,relatime |
138 |
|
evaluate_retval |
139 |
|
fi |
140 |
|
done |
141 |
|
# extra check for /var/lock |
142 |
|
if [ -L /var/lock ] |
143 |
|
then |
144 |
|
mkdir -p /run/lock |
145 |
|
rc_print "Mounting tmpfs at /run/lock ..." |
146 |
|
mount -n -t tmpfs tmpfs /run/lock -o rw,nosuid,nodev,relatime |
147 |
|
evaluate_retval |
148 |
|
fi |
149 |
|
# extra check if /run and /var/run are directories |
150 |
|
if [ -d /run ] && [ -d /var/run ] |
151 |
|
then |
152 |
|
rc_print "Mounting tmpfs at /var/run ..." |
153 |
|
mount -n -o bind /run /var/run |
154 |
|
evaluate_retval |
155 |
|
fi |
156 |
fi |
fi |
157 |
|
|
158 |
if [[ ${runlevel} = shutdown ]] || [[ ${runlevel} = reboot ]] |
if [[ ${runlevel} = shutdown ]] || [[ ${runlevel} = reboot ]] |
162 |
|
|
163 |
# if requested save devices to a device tarball before halt |
# if requested save devices to a device tarball before halt |
164 |
# only for kernels >=2.6 *and* udev |
# only for kernels >=2.6 *and* udev |
165 |
# make shure that udev is mounted but *not* devfs --> /dev/.devfsd |
# make sure that udev is mounted but *not* devfs --> /dev/.devfsd |
166 |
if [[ ${RC_DEVICE_TARBALL} = yes ]] && \ |
if [[ ${RC_DEVICE_TARBALL} = yes ]] && \ |
167 |
[ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ] |
[ -e /dev/.udev -a ! -e /dev/.devfsd -a ! -e /.bootdev ] |
168 |
then |
then |