Re: [systemd-devel] systemd-way for initialization zram swap

2013-01-05 Thread Maksim Melnikau
On Tue, Nov 20, 2012 at 2:30 AM, Lennart Poettering wrote: > If this is upstream in the kernel I think the nicest way to handle this > would be to extend util-linux to learn a new "zram" option or so we can > just add to the fstab lines, which sets up everything as needed. This > would then be sim

Re: [systemd-devel] systemd-way for initialization zram swap

2012-11-19 Thread Lennart Poettering
On Mon, 19.11.12 22:47, Maksim 'max_posedon' Melnikau (maxpose...@gmail.com) wrote: > # cat /etc/fstab | grep swap > /dev/zram0swapswap > sw,pri=1 0 0 > /dev/zram1swapswap

Re: [systemd-devel] systemd-way for initialization zram swap

2012-11-19 Thread Oleksii Shevchuk
> 1. this service is kind of duplicating swap.target > 2. echo inside duplicates things, which tmpfiles.d could do Maybe. IMO semantically, you have new device, that should be configured before use. It can appears after loading module. As for man 7 bootup, there is no deps between early targets.

Re: [systemd-devel] systemd-way for initialization zram swap

2012-11-19 Thread Maksim 'max_posedon' Melnikau
On Mon, Nov 19, 2012 at 11:16 PM, Oleksii Shevchuk wrote: > That's enough for me: > # cat /etc/systemd/system/zram-swap\@.service >... This is exactly what I dislike a bit, 1. this service is kind of duplicating swap.target 2. echo inside duplicates things, which tmpfiles.d could do 3. service st

Re: [systemd-devel] systemd-way for initialization zram swap

2012-11-19 Thread Oleksii Shevchuk
That's enough for me: # cat /etc/udev/rules.d/01-zram.rules KERNEL=="zram[0-9]", ENV{SYSTEMD_WANTS}="zram-swap@zram%n.service", TAG+="systemd" # cat /etc/systemd/system/zram-swap\@.service [Unit] Description=Setup swap on zram based device %i BindsTo=dev-%i.swap After=dev-%i.device Requires=de