Skip to content

Commit 14c0eb9

Browse files
committed
If running under ROOTHACK do not mount tmpfs on /var/db/pkg and /var/cache/pkg
1 parent f575729 commit 14c0eb9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/mdinit

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ mdinit_start()
2424
/sbin/mount -t tmpfs tmpfs /usr
2525
/rescue/gzip -d -c /.usr.tar.gz | /rescue/tar -x -C / -f -
2626
fi
27-
/sbin/mount -t tmpfs tmpfs /var/db/pkg
28-
mkdir -p /var/cache/pkg
29-
/sbin/mount -t tmpfs tmpfs /var/cache/pkg
27+
# Check if we are using roothack
28+
if ! /sbin/mount -t tmpfs | /usr/bin/grep -q " /rw "; then
29+
/sbin/mount -t tmpfs tmpfs /var/db/pkg
30+
mkdir -p /var/cache/pkg
31+
/sbin/mount -t tmpfs tmpfs /var/cache/pkg
32+
fi
3033
}
3134

3235
load_rc_config $name

0 commit comments

Comments
 (0)