Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524404 - sys-apps/sysvinit - add support for root unmounting
Summary: sys-apps/sysvinit - add support for root unmounting
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL: http://savannah.nongnu.org/bugs/?33517
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-10-03 20:14 UTC by i.Dark_Templar
Modified: 2024-04-07 06:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sysvinit-exec.patch (sysvinit-exec.patch,4.64 KB, patch)
2014-10-03 20:16 UTC, i.Dark_Templar
Details | Diff
sysvinit-data.tar.bz2 (sysvinit-data.tar.bz2,944 bytes, application/x-bzip2)
2014-10-03 20:17 UTC, i.Dark_Templar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description i.Dark_Templar 2014-10-03 20:14:47 UTC
There is a feature request at sysvinit bugzilla for root unmounting support.

Reproducible: Always
Comment 1 i.Dark_Templar 2014-10-03 20:16:12 UTC
Created attachment 386004 [details, diff]
sysvinit-exec.patch
Comment 2 i.Dark_Templar 2014-10-03 20:17:27 UTC
Created attachment 386006 [details]
sysvinit-data.tar.bz2
Comment 3 i.Dark_Templar 2014-10-03 20:25:18 UTC
I've also mailed attached patches and scripts to sysvinit-devel mail list, but it looks dead:
http://lists.nongnu.org/archive/html/sysvinit-devel/2014-06/msg00000.html

Patch is slightly different from the one attached to the mail, it has different file names. Patch attached to this bug is modified to be accepted when it's put to "/etc/portage/patches/sys-apps/sysvinit" directory.

Attached scripts just unmount root and proceed to powering off or rebooting system. For debugging purposes interactive shell is started right before reboot/poweroff. Just exit from it to continue to rebooting/powering off. Scripts are just an example, proof-of-concept, but they may be used for implementing further features, like shutting down encrypted tomes or lvm or anything else. Scripts require statically-linked busybox in order to work and they assume that they are put into directory "/usr/local/sbin".

WARNING: I've tested scripts at VM and they worked fine for me, but for your data safety read them first and try them on spare VM first.
Comment 4 Mike Gilbert gentoo-dev 2014-10-03 23:21:54 UTC
Seems like a nice feature to me. systemd is already capable of doing this, but it might be useful for those that prefer to stick with the old init/openrc.

I would suggest adding some documentation to the inittab.5 manpage.
Comment 5 Mike Gilbert gentoo-dev 2014-10-03 23:24:27 UTC
Also, a better summary for this bug would be "Allow replacement of PID 1 via exec action in inittab".