Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 347990 Details for
Bug 339472
sys-fs/nilfs-utils: need init.d helper for rootfs on nilfs2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
0001-Start-garbage-collector-for-nilfs2-as-root-fs.patch
0001-Start-garbage-collector-for-nilfs2-as-root-fs.patch (text/plain), 1.69 KB, created by
Peter Volkov (RETIRED)
on 2013-05-11 17:19:35 UTC
(
hide
)
Description:
0001-Start-garbage-collector-for-nilfs2-as-root-fs.patch
Filename:
MIME Type:
Creator:
Peter Volkov (RETIRED)
Created:
2013-05-11 17:19:35 UTC
Size:
1.69 KB
patch
obsolete
>From 15b8bae3002285cdce4f24ce947a89b19eda53b6 Mon Sep 17 00:00:00 2001 >From: Peter Volkov <pva@gentoo.org> >Date: Sat, 11 May 2013 20:31:01 +0400 >Subject: [PATCH] Start garbage collector for nilfs2 as root fs > >Use mount -f / to add entry to mtab. As a side effect this starts >nilfs2 garbage collector as expected and documented in man mount.nilfs2. > >https://bugs.gentoo.org/show_bug.cgi?id=339472 >--- > init.d/mtab.in | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > >diff --git a/init.d/mtab.in b/init.d/mtab.in >index beee3e1..ca9aad9 100644 >--- a/init.d/mtab.in >+++ b/init.d/mtab.in >@@ -15,20 +15,27 @@ start() > if [ -L /etc/mtab ] > then > einfo "Skipping mtab update (mtab is a symbolic link)" >+ mount -f / > /dev/null 2>&1 > return 0 > fi > > ebegin "Updating /etc/mtab" > if ! echo 2>/dev/null >/etc/mtab; then > ewend 1 "/etc/mtab is not updateable" >+ mount -f / > /dev/null 2>&1 > return 0 > fi > >- # With / as tmpfs we cannot umount -at tmpfs in localmount as that >- # makes / readonly and dismounts all tmpfs even if in use which is >- # not good. Luckily, umount uses /etc/mtab instead of /proc/mounts >- # which allows this hack to work. >- grep -v "^[! ]* / tmpfs " /proc/mounts > /etc/mtab >+ # Add the entry for / to mtab >+ if $(grep -qv "^[! ]* / tmpfs " /proc/mounts); then >+ mount -f / > /dev/null 2>&1 >+ else >+ # With / as tmpfs we cannot umount -at tmpfs in localmount as >+ # that makes / readonly and dismounts all tmpfs even if in use >+ # which is not good. Luckily, umount uses /etc/mtab instead of >+ # /proc/mounts which allows this hack to work. >+ grep -v "^[! ]* / tmpfs " /proc/mounts > /etc/mtab >+ fi > > # Remove stale backups > rm -f /etc/mtab~ /etc/mtab~~ >-- >1.8.1.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 339472
:
249326
|
249338
|
347990