From 2cf57b8fcd13be62f98a812d6cf6a0990776b4e0 Mon Sep 17 00:00:00 2001 From: Alex Matviychuk Date: Fri, 23 Jul 2010 05:19:22 -0700 Subject: [PATCH 1/2] - Start nilfs garbage collector for root partition if needed. --- rc.sysinit | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index fba11b2..4f7f87e 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -297,6 +297,14 @@ fi stat_busy "Mounting Local Filesystems" /bin/mount -n -o remount,rw / + +# Start NILFS garbage collector manually, only needed explicitly for rootfs +nilfs_root_dev=$(findmnt -n -o SOURCE -t nilfs2 /) +if [ -n $nilfs_root_dev ]; then + echo -n "Starting NILFS garbage collector for $nilfs_root_dev" + /sbin/nilfs_cleanerd $nilfs_root_dev +fi + if [ -x /bin/findmnt -a -e /proc/self/mountinfo ]; then /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab else -- 1.7.2.1 From e78ac14103df281c832b14ea88f5919c232d31c4 Mon Sep 17 00:00:00 2001 From: Alex Matviychuk Date: Sun, 1 Aug 2010 01:09:31 -0700 Subject: [PATCH 2/2] - Made rootfs variable name consistent. - Fixed -n conditional by adding quotes, as Dieter suggested. --- rc.sysinit | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 4f7f87e..c339c50 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -299,10 +299,10 @@ stat_busy "Mounting Local Filesystems" /bin/mount -n -o remount,rw / # Start NILFS garbage collector manually, only needed explicitly for rootfs -nilfs_root_dev=$(findmnt -n -o SOURCE -t nilfs2 /) -if [ -n $nilfs_root_dev ]; then - echo -n "Starting NILFS garbage collector for $nilfs_root_dev" - /sbin/nilfs_cleanerd $nilfs_root_dev +NILFS_ROOT_DEV=$(findmnt -n -o SOURCE -t nilfs2 /) +if [ -n "$NILFS_ROOT_DEV" ]; then + echo -n "Starting NILFS garbage collector for ${NILFS_ROOT_DEV}" + /sbin/nilfs_cleanerd $NILFS_ROOT_DEV fi if [ -x /bin/findmnt -a -e /proc/self/mountinfo ]; then -- 1.7.2.1