[arch-general] dbus update - /etc/passwd merge question
Robbie Smith
zoqaeski at gmail.com
Fri Dec 14 06:46:31 EST 2012
On 14/12/12 19:37, Rodrigo Rivas wrote:
> On Fri, Dec 14, 2012 at 8:39 AM, Robbie Smith <zoqaeski at gmail.com> wrote:
>
>> On 14/12/12 01:04, Neil Perry wrote:
>>
>>> On 13 December 2012 13:52, Robbie Smith <zoqaeski at gmail.com> wrote:
>>>
>>> vipw and vigr don't seem to do anything for me. It doesn't matter what
>>>> changes I make, they both report that nothing was changed.
>>>>
>>>> # vipw
>>>> (Makes changes in $EDITOR, writes and quits)
>>>> vipw: no changes made
>>>> vipw: /etc/passwd unchanged
>>>>
>>>> ?
>>>>
>>>>
>>> I believe vipw and vigr will launch the file in using $EDITOR. Once you
>>> have made changes it will sanity check in a sandbox style before saving to
>>> the 'production' file.
>>>
>>> Correct me if I'm wrong please.
>>>
>>> Neil
>>>
>>> That's what it's supposed to do, according to all the documentation that
>> I can find. But (for me at least), it opens a temporary file in $EDITOR
>> named vi(pw|gr).XXXXXX, where XXXXXX is a random string. Upon editing the
>> file and exiting the editor, instead of comparing and merging the changes
>> to the production file, it does nothing. I've even made a copy of the
>> production file myself (as an extra precaution), and deleted every line in
>> the tmp file, and it still does nothing.
>>
>
> That may depend on the editor used, you didn't say what you use. I expect
> that if the editor exit code is anything other than EXIT_SUCCESS (that is
> 0) the edition is cancelled. And some editors out there may not be mindful
> about the exit status. I'd recommend to use for example "vi", that does it
> right, and see what happens.
> --
> Rodrigo
>
Fixed it: turned off the writebackup option in root's ~/.vimrc, and it
works properly. I should have asked the google about vim and vipw before
posting =/
More information about the arch-general
mailing list