Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread Michal Vyskocil
On Wed, Jul 31, 2013 at 06:59:18PM +0100, lux-integ wrote: On Wednesday 31 July 2013 14:22:35 Michal Vyskocil wrote: You can split the logic into two mount units with opposite Condition #mountpoint.mount [Unit] Description=mount mountpoint ConditionPathIsMountPoint=/mountpoint

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread lux-integ
On Wednesday 31 July 2013 14:36:25 Colin Guthrie wrote: Mount units have to be named specially after their mount points, so be careful there e.g. if the mount point is /mnt/mymountpoint then the unit should be called mnt-mymountpoint.mount thanks for your reply Now I have an init script to

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread Colin Guthrie
'Twas brillig, and lux-integ at 01/08/13 11:53 did gyre and gimble: On Wednesday 31 July 2013 14:36:25 Colin Guthrie wrote: Mount units have to be named specially after their mount points, so be careful there e.g. if the mount point is /mnt/mymountpoint then the unit should be called

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread lux-integ
On Thursday 01 August 2013 12:15:21 Colin Guthrie wrote: The rootfs mount is called -.mount (i.e. a leading -) many thanks for this To be honest with you tho', unless you are tailoring your system for a very specific case yes this is so, it is remounting / (RW) earlier in the boot process

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread Tom Gundersen
On Thu, Aug 1, 2013 at 1:45 PM, lux-integ lux-in...@btconnect.com wrote: On Thursday 01 August 2013 12:15:21 Colin Guthrie wrote: The rootfs mount is called -.mount (i.e. a leading -) many thanks for this To be honest with you tho', unless you are tailoring your system for a very specific

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread lux-integ
On Thursday 01 August 2013 12:58:46 Tom Gundersen wrote: 'm not following. Do you mean that systemd is already doing what you need, not sure as I am just learning ...but suppose I have already mounted proc, run and sys and I want just a read only root filesystem --a) how do I get

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread Colin Guthrie
'Twas brillig, and lux-integ at 01/08/13 15:25 did gyre and gimble: On Thursday 01 August 2013 12:58:46 Tom Gundersen wrote: 'm not following. Do you mean that systemd is already doing what you need, not sure as I am just learning ...but suppose I have already mounted proc, run

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread Tom Gundersen
On Thu, Aug 1, 2013 at 4:25 PM, lux-integ lux-in...@btconnect.com wrote: On Thursday 01 August 2013 12:58:46 Tom Gundersen wrote: 'm not following. Do you mean that systemd is already doing what you need, not sure as I am just learning ...but suppose I have already mounted proc, run

Re: [systemd-devel] macros in systemd unit files question

2013-08-01 Thread Daniel Wallace
On Thu, Aug 1, 2013 at 9:41 AM, Colin Guthrie gm...@colin.guthr.ie wrote: 'Twas brillig, and lux-integ at 01/08/13 15:25 did gyre and gimble: On Thursday 01 August 2013 12:58:46 Tom Gundersen wrote: 'm not following. Do you mean that systemd is already doing what you need, not sure

[systemd-devel] macros in systemd unit files question

2013-07-31 Thread lux-integ
I am trying to learn systemD. I scaned through some of the man pages. I am here asking if systemD unit file synthesis can be made to support macros; for example of the following type:- #-- IF mountpoint exists /bin/mount /dev/something $mountpoint ELSE /bin/mount

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread Tom Gundersen
Hi, On Wed, Jul 31, 2013 at 2:14 PM, lux-integ lux-in...@btconnect.com wrote: I am trying to learn systemD. I scaned through some of the man pages. I am here asking if systemD unit file synthesis can be made to support macros; for example of the following type:- #-- IF

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread lux-integ
On Wednesday 31 July 2013 13:26:18 Tom Gundersen wrote: If you really need a proper programming language, then you'd be better off using a script and pointing ExecStart to that. example please? ___ systemd-devel mailing list

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread Tom Gundersen
On Wed, Jul 31, 2013 at 3:05 PM, lux-integ lux-in...@btconnect.com wrote: On Wednesday 31 July 2013 13:26:18 Tom Gundersen wrote: If you really need a proper programming language, then you'd be better off using a script and pointing ExecStart to that. example please? Make a bash script (or

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread Michal Vyskocil
On Wed, Jul 31, 2013 at 01:14:08PM +0100, lux-integ wrote: I am trying to learn systemD. I scaned through some of the man pages. I am here asking if systemD unit file synthesis can be made to support macros; for example of the following type:- #-- IF

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread Colin Guthrie
'Twas brillig, and lux-integ at 31/07/13 13:14 did gyre and gimble: I am trying to learn systemD. I scaned through some of the man pages. The first thing to learn is that's it's systemd, not systemD ;) I am here asking if systemD unit file synthesis can be made to support macros;

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread lux-integ
On Wednesday 31 July 2013 14:13:56 Tom Gundersen wrote: example please? Make a bash script (or whatever else) doing what you want (the pseudo-code you posted). Save it as /usr/local/bin/foo and create a unit file with ExecStart=/usr/local/bin/foo. thanks for your suggestion. just one last

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread Tom Gundersen
On Wed, Jul 31, 2013 at 4:03 PM, lux-integ lux-in...@btconnect.com wrote: #-- IF mountpoint exists /bin/echo obladee /bin/mount /dev/something $mountpoint ELSE /bin/echo obladaa /bin/mount /dev/something somewherelse ENDiF #-- does this file

Re: [systemd-devel] macros in systemd unit files question

2013-07-31 Thread Kay Sievers
On Wed, Jul 31, 2013 at 2:14 PM, lux-integ lux-in...@btconnect.com wrote: I am trying to learn systemD. I scaned through some of the man pages. I am here asking if systemD unit file synthesis can be made to support macros; for example of the following type:- #-- IF