summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorccsmart <ccsmart@smartpal.de>2005-07-16 19:30:48 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-07-16 19:30:48 +0000
commite79aeff420bed2d70be6ba2075343f3d97db3eb0 (patch)
treee17478e17286959f4693411af1ea4168bd0c787b /packages
parent5ad98d0e3aa8e28b95c6f91ccfa9d1457ac286e8 (diff)
Modified to work with populate-var and allow per target (nfs,disk...) definition of ramfs objects.
Diffstat (limited to 'packages')
-rw-r--r--packages/openslug-init/openslug-init-0.10/turnup28
-rw-r--r--packages/openslug-init/openslug-init_0.10.bb2
2 files changed, 17 insertions, 13 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/turnup b/packages/openslug-init/openslug-init-0.10/turnup
index 80afac7819..977fa1f520 100644
--- a/packages/openslug-init/openslug-init-0.10/turnup
+++ b/packages/openslug-init/openslug-init-0.10/turnup
@@ -4,6 +4,10 @@
#
. /etc/default/functions
+INRAM_MEMSTICK="/var/cache /var/lock /var/log /var/run /var/tmp /var/lib/ipkg"
+INRAM_NFS="/var/cache /var/run"
+INRAM_DISK=""
+
#
# force: override certain checks
force=
@@ -169,29 +173,29 @@ setup_var() {
}
case "$2" in
disk|nfs|memstick);;
- *) echo "turnup: setup_var($1,$2): expected 'disk' or 'nfs'" >&2
+ *) echo "turnup: setup_var($1,$2): expected 'disk', 'nfs' or 'memstick'" >&2
return 1;;
esac
#
# populate /var, there is a shell script to do this, but it uses
# absolute path names
- chroot "$1" /bin/busybox sh /etc/init.d/populate-var.sh || {
+ chroot "$1" /bin/busybox sh /etc/init.d/populate-volatile.sh || {
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
- ;;
+ disk) RAMTARGETS=${INRAM_DISK};;
+ nfs) RAMTARGETS=${INRAM_NFS};;
+ memstick) RAMTARGETS=${INRAM_MEMSTICK};;
esac
+
+ for d in ${RAMTARGETS}; do
+ RAMDIR="/media/ram${d}"
+ REALDIR="${d}"
+ rm -rf "${1}${REALDIR}"
+ ln -s "${RAMDIR}" "${1}${REALDIR}"
+ done
# 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
diff --git a/packages/openslug-init/openslug-init_0.10.bb b/packages/openslug-init/openslug-init_0.10.bb
index 0fa2da717f..e55d0f05db 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 = "r35"
+PR = "r36"
SRC_URI = "file://linuxrc \
file://boot/flash \