All of lore.kernel.org
 help / color / mirror / Atom feed
* systemd.setenv and a mount.unit
@ 2014-11-19 22:48 Jakob Schürz
  2014-11-20 10:17 ` Goffredo Baroncelli
  2014-11-20 12:04 ` Brendan Hide
  0 siblings, 2 replies; 7+ messages in thread
From: Jakob Schürz @ 2014-11-19 22:48 UTC (permalink / raw)
  To: linux-btrfs

Hi there!

Another challenge...
I'm using btrfs. So i make snapshots from my system. And in a script, I 
make a symlink (for example: @system.CURRENT and @system.LAST) for the 
current and the last snapshot.

So i want to add 2 entries in grub2 from which i can boot into the 
current and the last snapshot.

I tried to pass an environmental variable with 
systemd.setenv=BOOTSNAP=@system.CURRENT, and i have a mount-unit 
containing the option

Options=defaults,nofail,subvol=archive-local/@system.$BOOTSNAP

but it doesn't work. If i change $BOOTSNAP to CURRENT, the mount works.
So i made a test.service, containing only
StartExec=/bin/echo $BOOTSNAP
I get the value @system.CURRENT in the logs...

How can I do this mounts?

jakob
-- 
http://xundeenergie.at
http://verkehrsloesungen.wordpress.com/
http://cogitationum.wordpress.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-10 14:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 22:48 systemd.setenv and a mount.unit Jakob Schürz
2014-11-20 10:17 ` Goffredo Baroncelli
2014-11-20 10:35   ` Jakob Schürz
2014-11-20 11:14     ` Goffredo Baroncelli
2014-11-20 18:39       ` Chris Murphy
2014-12-10 14:36         ` David Sterba
2014-11-20 12:04 ` Brendan Hide

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.