From f21639af3a1b9e1fbf1c8bdfc37f55ef2df30e12 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 8 Sep 2011 04:29:47 +0200 Subject: [PATCH] busybox: mount special filesystems in init script, unmount all of this filesystem on reboot/shutdown Signed-off-by: Stephan Raue --- .../sysutils/busybox/init.d/01_mount-filesystem | 13 +++++++++++++ packages/sysutils/busybox/scripts/init | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/sysutils/busybox/init.d/01_mount-filesystem b/packages/sysutils/busybox/init.d/01_mount-filesystem index fa1c4e8c09..f8b58e349c 100644 --- a/packages/sysutils/busybox/init.d/01_mount-filesystem +++ b/packages/sysutils/busybox/init.d/01_mount-filesystem @@ -26,10 +26,23 @@ case $RUNLEVEL in boot) progress "mounting needed filesystems" + mount -n -t devtmpfs none /dev + mkdir -p /dev/pts + mount -n -t devpts -o gid=5,mode=620 none /dev/pts + mkdir -p /dev/shm + mount -n -t tmpfs none /dev/shm + mount -n -t tmpfs none /run mount -n -t ramfs none /var + mount "$disk" /storage -o rw,noatime > /dev/null 2>&1 ;; + poweroff|reboot) progress "unmounting filesystems" + umount /storage umount /var + umount /run + umount /dev/shm + umount /dev/pts + umount /dev ;; esac diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 7754bf3976..25f8afa3b4 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -26,16 +26,6 @@ echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink - mount -n -t devtmpfs none /dev - - mkdir -p /dev/pts - mount -n -t devpts -o gid=5,mode=620 none /dev/pts - - mkdir -p /dev/shm - mount -n -t tmpfs none /dev/shm - - mount -n -t tmpfs none /run - # showing version lsb_release