[arch-projects] [PATCH] shutdown: add a shutdown hook

Tom Gundersen teg at jklm.no
Sat Jul 23 07:42:30 EDT 2011


On Sat, Jul 23, 2011 at 7:26 AM, Dan McGee <dpmcgee at gmail.com> wrote:
> On Fri, Jul 22, 2011 at 7:13 PM, Tom Gundersen <teg at jklm.no> wrote:
>> v2: copy the needed libraries to the new ramfs
>> v3: support for 32-bit, and cleanup
> If you put these below the --- (three dashes), they won't show up when
> you commit to git. (Use git format-patch then edit the results before
> send-email).

Good point. I'll do that (there will, sadly, be a v4).

>> diff --git a/hooks/shutdown b/hooks/shutdown
>> new file mode 100644
>> index 0000000..f22a0f0
>> --- /dev/null
>> +++ b/hooks/shutdown
>> @@ -0,0 +1,17 @@
>> +# vim: set ft=sh:
>> +run_hook ()
>> +{
>> +    msg -n ":: Creating shutdown ramfs..."
>> +    mkdir -p /run/initramfs/usr/bin
>> +    mkdir /run/initramfs/usr/sbin
>> +    mkdir /run/initramfs/bin
>> +    mkdir /run/initramfs/sbin
>> +    mkdir /run/initramfs/lib
> One liner:
> mkdir -p /run/initramfs/{usr/bin,usr/sbin,bin,sbin,lib}

This is not bash, so that would not work.


More information about the arch-projects mailing list