[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proper syntax for plain-file with sudoers-file
From: |
Alex Kost |
Subject: |
Re: Proper syntax for plain-file with sudoers-file |
Date: |
Sun, 21 Jun 2015 16:30:47 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
白い熊@相撲道 (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