Patch runit to exec upon shutdown

Bug #1238343 reported by Ryan Finnie on 2013-10-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Finnix
Wishlist
Ryan Finnie

Bug Description

Currently the initrd moves the userland /sbin/runit to /.init and links it back, to make it run from RAM so the union (and hence CD) aren't blocked upon shutdown. It works, but is sort of a hack. A better approach would be if runit could exec another program at the very end (giving it PID 1). Turns out this is really easy to patch into runit.

1) Patch runit, make it look for /etc/runit/4 and execve() it if it exists, after stage 3 is done.
2) Split state-shutdown-real, with the first half being state-stopping.
3) ln -s state-stopping 3; ln -s state-shutdown 4
4) Remove /.init hack in initrd.

Distribution: 109
Source: finnix-scripts
Source-Version: 20131010.0

A package update has been sent to the Finnix archive, which marks this
bug as fixed. A copy of the upload changes is included below.

Thank you,
Your friendly Finnix Launchpad assistant

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 10 Oct 2013 18:16:45 -0700
Source: finnix-scripts
Binary: finnix-scripts
Architecture: source all
Version: 20131010.0
Distribution: unstable
Urgency: low
Maintainer: Ryan Finnie <email address hidden>
Changed-By: Ryan Finnie <email address hidden>
Description:
 finnix-scripts - Scripts needed to run Finnix
Changes:
 finnix-scripts (20131010.0) unstable; urgency=low
 .
   * Split state-shutdown-real into state-stopping (LP: #1238343)
Checksums-Sha1:
 02409c0522adfb474f67ea45b231b9c6001d14ce 1632 finnix-scripts_20131010.0.dsc
 3ece29d10cf698fcd6932e1e4d16b13e780995e2 36864 finnix-scripts_20131010.0.tar.xz
 3ebc19708c6786c2040d0db96e0877978c8e9ca0 66756 finnix-scripts_20131010.0_all.deb
Checksums-Sha256:
 dbc78d273dd9ce11f4119d5da993f61ed4103cb5da6638d316e9c04e3e1e0122 1632 finnix-scripts_20131010.0.dsc
 f9e768ebc8669703607065c4494e6fc373c6f149cdb549c0ff7af953c30ef434 36864 finnix-scripts_20131010.0.tar.xz
 0c7c2046210755b15bfff6359a6852bd46945eb75c0fc73109b9dadc454b59d6 66756 finnix-scripts_20131010.0_all.deb
Files:
 f521395dce191757ecf2cf302f24212a 1632 misc optional finnix-scripts_20131010.0.dsc
 fc7127bf2d0b733fc6da7c00dcfba674 36864 misc optional finnix-scripts_20131010.0.tar.xz
 b5739af662de169f0a5f3383f9a9191c 66756 misc optional finnix-scripts_20131010.0_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJSV1G2AAoJEH5go6aGro2YXwQP/jzyTcSCneQNEKAlX/mVhr84
dsJ430YC2BA0Hwis9APGR2d5Y9Pa1NYDscFnMcOJ3lujlz+Dhx0PcjrFyg7i600T
/Uasrdxe3CSYFJke69zGqjDSO+H04bRtMTPsUOAG1Brq/IXBFYi96m6uCEo7hsdy
ch4kMYBiGbhIx5LJtVnVBGzBqX6ivHUUaoBpku4LUrbLRj7tB1VVOJ72TNIgI5Bm
Fk6qLO1MUKp9YDXIKYQGbqMMbrHB9hQ4ttshAFFPjTsRk1OSNq3eJRALFid4GgSB
+DEVA3qP+uNNZWMacrs3k4fKxUjWB+PpIVCVIssW0SaCRg39Gj23gNZ/c/sJ3Bu6
mkGyxSz0kQlAmFHDUZu5mNAUOSQ02kxu9kh1WkNJ0h31bIhmaAJ5cM+dgUaW60HL
ZAscAYyRzC+KPARm8Sowin2tCSRiKPb6vSweoRiA22jiniVsUL0Ae9tDDHHerD6Z
mK6wLIwNniU0AtfhRDtZIWU6NvmyLPIfGHYQTQQ35ENDMX1TdXc838LTD6QiVTux
D+KWoLAzGPkqL9h3iCPOtr8TmBXwH0OhSkD4XqqVtUZFyXuM38Pbe6MFplaaDMVR
kS9oR0NTzAw0QXVDHhEY3yCiebcbzsKNKwS1azGRWJsThq7cBRW85IVmfD1ablx4
u8jiFSH6xOLgV8tczmOY
=WBfT
-----END PGP SIGNATURE-----

Changed in finnix:
status: New → Fix Committed
tags: added: archive-fixed finnix-scripts
tags: added: runit

Distribution: 109
Source: runit
Source-Version: 2.1.1-6.2finnix1

A package update has been sent to the Finnix archive, which marks this
bug as fixed. A copy of the upload changes is included below.

Thank you,
Your friendly Finnix Launchpad assistant

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 10 Oct 2013 16:15:36 -0700
Source: runit
Binary: runit
Architecture: source
Version: 2.1.1-6.2finnix1
Distribution: unstable
Urgency: low
Maintainer: Gerrit Pape <email address hidden>
Changed-By: Ryan Finnie <email address hidden>
Description:
 runit - system-wide service supervision
Changes:
 runit (2.1.1-6.2finnix1) unstable; urgency=low
 .
   * Add stage 4 functionality (LP: #1238343)
Checksums-Sha1:
 6f90c168986e5baab5d9aaad7e768d481a7531c9 1759 runit_2.1.1-6.2finnix1.dsc
 8eee39639dcb79ba251ca4ab2c7cde38059f09c2 109661 runit_2.1.1.orig.tar.gz
 8257114494f7a01d4a960947fb55d2bf07b07124 15772 runit_2.1.1-6.2finnix1.diff.gz
Checksums-Sha256:
 bc1dbe6cb34da0d2be2aeb7d541892eb03fda1533ef8ab445973b1ef1b851636 1759 runit_2.1.1-6.2finnix1.dsc
 ffcf2d27b32f59ac14f2d4b0772a3eb80d9342685a2042b7fbbc472c07cf2a2c 109661 runit_2.1.1.orig.tar.gz
 0f39944408c95d9f248f4a44860518e4c89b2136c5930e233d88a12e78b3f7e7 15772 runit_2.1.1-6.2finnix1.diff.gz
Files:
 1eedb5fd07765eb987d847a4227d5cf4 1759 admin optional runit_2.1.1-6.2finnix1.dsc
 8fa53ea8f71d88da9503f62793336bc3 109661 admin optional runit_2.1.1.orig.tar.gz
 723d5e5405d8ba3f072ef3fa72e48f06 15772 admin optional runit_2.1.1-6.2finnix1.diff.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJSV0+IAAoJEH5go6aGro2Y9xcP/jq8Jr+bprXqqa+7/0c1EG4m
U6fO4gVgUbcuUdEaA2M7OOmvyoVKl8W6TyvDl2Buw2g3O5RJ3VcTZzmf0Bnx7U1/
B5iBc2vsHGrVEEmdnCF1ek8xn//c5sxpD14p5D7hJYfB9TCYaC5ZFuwtcNAvI7Qe
XT3vacynn5aF8VSMwi4ASlsIqGMYyoG32Vq/0gdKm4NNfF2u+qpOc4EasynBz2/J
ZxufXAYjpvog/+ZyS9agU3lrjGY0tpN8i2Bai810TRE8O3Wanm1daH0P2/ptmkKJ
IHThMVjPRM/KUYMVTchaAxZRU77Bvzv+QKyKuBRxNqTXiDMfnKHA/Kv1jyBY2LVq
LDw7Ro0r2SvvTuoJoufuVwp1xl5eK8CUySwAfcYD0RwLcsqaQy25jrdu0uL7h/ge
MiqjnFUOcqg3tWBHcA/booBoyj2YWxMCw0wjYHpQqrTZJwAjiAQVv4threfUZflx
RSGanre3FtdgG1crQ/b8F13g/D4Lj3aiSYntB+PGU8q1gR2UJu2nVUp5VJIZCog9
AP5TevuSFf3XeTbEWjD504GnewJTqQC/VWO1EnyWgWuJVhtA7V6kIU4NvHwTFFFL
cH0GNW/qhVq90z79WGFBItiDMcBW7pUY/DA5AJPa0XsihE3j2TYSPK7O9NgpxWs8
XakJ5SgsG8GkLrCU3omy
=rHHI
-----END PGP SIGNATURE-----

tags: added: neale-initrd

Distribution: 109
Source: neale-initrd
Source-Version: 20131010.0

A package update has been sent to the Finnix archive, which marks this
bug as fixed. A copy of the upload changes is included below.

Thank you,
Your friendly Finnix Launchpad assistant

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 10 Oct 2013 18:11:03 -0700
Source: neale-initrd
Binary: neale-initrd
Architecture: source
Version: 20131010.0
Distribution: unstable
Urgency: low
Maintainer: Ryan Finnie <email address hidden>
Changed-By: Ryan Finnie <email address hidden>
Description:
 neale-initrd - Finnix initrd layout (udeb)
Changes:
 neale-initrd (20131010.0) unstable; urgency=low
 .
   * Remove runit hack (LP: #1238343)
Checksums-Sha1:
 a0128c2e22afa51983a880e70a9d5bca93c5d1cb 1644 neale-initrd_20131010.0.dsc
 6c1ac4cdc548ce8259838a0494e1c1674724a427 3055724 neale-initrd_20131010.0.tar.xz
Checksums-Sha256:
 dfd3b8d6076411ba52d5468712230892d1568cf9ddf56f26ca0cebfbb505dcc5 1644 neale-initrd_20131010.0.dsc
 bc8ae1077faf465695d95364e2359c5a88e3bba01b6b99b3832303951ee07c72 3055724 neale-initrd_20131010.0.tar.xz
Files:
 15032d2efd20b326c26ad96b6e7fa089 1644 debian-installer optional neale-initrd_20131010.0.dsc
 ed90f1928494a239b9c4d530d330a00c 3055724 debian-installer optional neale-initrd_20131010.0.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJSV1BIAAoJEH5go6aGro2YY4IP/3as2e59oVs1EvZTO66rVYe7
T7QtiwLvLarY7/T2PkiZQidvHVc3kvkfIQ73EzvZfqg65Eia2qZ6H/sCaNLxX2Dq
jBSUV8TeuDcVgekYE+JdDCDQZ4TGO1HT5Ywkpf7siq2JdJuWyB//ob1cmtlcrznH
/XjQlsfxgcUoNTlTWxdcjzSMb5FctBGXnBXRLRZf2WPNjWdafP1bVa3Ahbwf2lH+
jNRXdA5xOnGSTg3Om7sOvAwX7PDkj96i/79/Tu631yEVhvwXQ2hcVQu2klj/iuxr
vBWazbuIxwFkeNcXgbxnrZBn/0VQeNT3ma7KIxBQ4UW3ZZXPODZn0H9/t5tdzrTx
z8opOzSRnzjV21/qWinfchHkzPibq6bx6XlqjE5H7QtUonWjdANJNdjkcMZsu+f9
qMxyqz62BsapQXfI9un+iuXCbOyHkEJVFTDKa76O+v1Zbccu6sV2Q9Se6LgbqXPq
nsw49BiI6ISFSL10iLht8rfcjOqWZnD34pIbsAayMsCk7wiDnuBG4p/EJhgR+BkU
JDEddSTDzHGa+Ko7lyi0MTNjWvYhssm0mti3sZxXe3f/cUo5P8uqQeaix+P952A3
PflczIkHg2O//rNmO219uwlOjpLePpK1Tmi3pWCal9fUdM/VsCZEm99wHfyuEALR
YJqQ4xeZrNJR5h6dA0q6
=acxu
-----END PGP SIGNATURE-----

Ryan Finnie (fo0bar) on 2013-10-13
Changed in finnix:
assignee: nobody → Ryan Finnie (fo0bar)
Ryan Finnie (fo0bar) on 2013-11-14
Changed in finnix:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers