blob: 5783dae07816cbfc85ce0813fbba9580b0640df6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--- nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.sysinit.orig 2004-11-09 21:45:46.000000000 +1030
+++ nslu2-linksys-ramdisk-2.3r25/etc/rc.d/rc.sysinit 2004-11-09 21:41:47.000000000 +1030
@@ -13,7 +13,23 @@
mkdir -p /var/lock/samba >/dev/null
-/bin/echo "Creating ramfs for /var/lock/samba:"; mount -t ramfs none /var/lock/samba -o maxsize=64
-/bin/echo "Limit the space of log folder:"; mount -t ramfs none /var/log -o maxsize=128
+
+/bin/echo "Creating ramfs for /dev:"
+/bin/mount -t ramfs ramfs /mnt/tmpmnt
+/bin/cp -rp /dev/* /mnt/tmpmnt/
+/bin/mkdir -p /dev.state
+/bin/mount -o bind /dev /dev.state
+/bin/mount -o bind /mnt/tmpmnt /dev
+/bin/umount /mnt/tmpmnt
+/bin/echo "Creating ramfs for /var:"
+/bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
+/bin/cp -rp /var/* /mnt/tmpmnt/
+/bin/mkdir -p /var.state
+/bin/mount -o bind /var /var.state
+/bin/mount -o bind /mnt/tmpmnt /var
+/bin/umount /mnt/tmpmnt
+/bin/killall syslogd
+/bin/killall klogd
+
mkdir -p /var/log/samba >/dev/null
touch /var/log/server.log >/dev/null
chmod 755 /var/log/samba >/dev/null
|