summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorccsmart <ccsmart@smartpal.de>2005-07-12 19:19:45 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-07-12 19:19:45 +0000
commit484e160440fa31ecaa9ac4c7659edb67103ae3af (patch)
tree389326e7255c21da24235238f7299873818e6d91
parent1960fe8772eb7bbaa91ff78876be9e8879940f89 (diff)
Modified turnup to configure memstick for /var to run splitted in between tmpfs and disk directories.
-rw-r--r--packages/openslug-init/openslug-init-0.10/turnup37
-rw-r--r--packages/openslug-init/openslug-init_0.10.bb2
2 files changed, 25 insertions, 14 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/turnup b/packages/openslug-init/openslug-init-0.10/turnup
index 86c573a93b..80afac7819 100644
--- a/packages/openslug-init/openslug-init-0.10/turnup
+++ b/packages/openslug-init/openslug-init-0.10/turnup
@@ -158,16 +158,17 @@ setup_bootdev() {
#
# setup_var new type
-# Populates /var. Should only be called for true disk systems and NFS -
-# it's a waste on USB memory sticks! Removes the /var tmpfs setting
-# for disks, sets it to /var/tmp for NFS.
+# Populates /var.
+# Removes the /var tmpfs entry from /etc/fstab.
+# Creates links from /var into /media/ram for NFS and Memstick.
+
setup_var() {
test -n "$1" -a -d "$1"/var || {
echo "turnup: setup_var($1,$2): expected a directory" >&2
return 1
}
case "$2" in
- disk|nfs);;
+ disk|nfs|memstick);;
*) echo "turnup: setup_var($1,$2): expected 'disk' or 'nfs'" >&2
return 1;;
esac
@@ -178,15 +179,24 @@ setup_var() {
echo "turnup: /var: could not populate directory" >&2
return 1
}
+
+ case "$2" in
+ nfs|memstick)
+ for d in "cache" "lock" "log" "run" "tmp" "lib/ipkg"; do
+ RAMDIR="/media/ram/${d}"
+ VARDIR="/var/${d}"
+ rm -rf "${1}/${VARDIR}"
+ ln -s "${RAMDIR}" "${1}/${VARDIR}"
+ sed -i "s@ ${VARDIR}@ ${RAMDIR}@" "$1"/etc/init.d/populate-var.sh
+ done
+ echo "mkdir -p /media/ram/lib/ipkg" >>"$1"/etc/init.d/populate-var.sh
+ ;;
+ esac
# the startup link is left for the moment, this seems safer
#rm "$1"/etc/rc?.d/[KS]??populate-var.sh
# remove the /var tmpfs entry from the new /etc/fstab
- case "$2" in
- disk) sed -i '\@[ ]/var[ ][ ]*tmpfs[ ]@d' "$1"/etc/fstab
- echo "turnup: tmpfs will no longer be mounted on /var" >&2;;
- nfs) sed -i '\@[ ]/var[ ][ ]*tmpfs[ ]@s@[ ]/var@&/tmp@' "$1"/etc/fstab
- echo "turnup: tmpfs /var mount moved to /var/tmp" >&2;;
- esac
+ sed -i '\@[ ]/var[ ][ ]*tmpfs[ ]@d' "$1"/etc/fstab
+ echo "turnup: tmpfs will no longer be mounted on /var" >&2
#
# Previous versions of turnup removed populate-var.sh from the
# startup links, this one doesn't, so /var can be made back into
@@ -243,12 +253,13 @@ setup_rootfs() {
case "$type" in
flash) return 0;;
disk) setup_dev "$new" "$table" &&
- setup_var "$new" disk &&
+ setup_var "$new" "$type" &&
setup_syslog "$new";;
memstick)
- setup_bootdev "$new" "$table" ;;
+ setup_bootdev "$new" "$table" &&
+ setup_var "$new" "$type" ;;
nfs) setup_dev "$new" "$table" &&
- setup_var "$new" nfs &&
+ setup_var "$new" "$type" &&
setup_syslog "$new";;
*) echo "turnup: setup_rootfs: $type: unknown rootfs type" >&2
return 1;;
diff --git a/packages/openslug-init/openslug-init_0.10.bb b/packages/openslug-init/openslug-init_0.10.bb
index b5801e252c..0fa2da717f 100644
--- a/packages/openslug-init/openslug-init_0.10.bb
+++ b/packages/openslug-init/openslug-init_0.10.bb
@@ -3,7 +3,7 @@ SECTION = "console/network"
LICENSE = "GPL"
DEPENDS = "base-files devio"
RDEPENDS = "busybox devio"
-PR = "r34"
+PR = "r35"
SRC_URI = "file://linuxrc \
file://boot/flash \