白い熊@相撲道 (2015-06-21 12:36 +0300) wrote:

> I've been using
> (sudoers "xxx...")
> in my config.scm file a long time. 
>
> Now, for some time it's been warning me that using a string for file
> “sudoers” is deprecated and to use “plain-file”.
>
> So I've tried
> (sudoers-file (plain-file "/etc/sudoers" "xxx..."))
> but I'm told: “invalid character `/' in name `/etc/sudoers'”
>
> What's the proper syntax? 

Hi, I use the following:

   (sudoers-file (local-file "/path/to/my/sudoers"))

As for the 'plain-file', IIUC it may be used like this (not tested):

   (sudoers-file (plain-file "sudoers" "<the contents of sudoers>"))

i.e., don't use "/etc/sudoers", just "sudoers" – with that
"/gnu/store/…-sudoers" file with the specified contents will be created.
But again, I've never used 'plain-file' so I'm not absolutely sure.

-- 
Alex

Reply via email to