openresolv icon indicating copy to clipboard operation
openresolv copied to clipboard

Add resolv_conf_mv=auto option

Open pemensik opened this issue 1 year ago • 4 comments

It requires stat -c %D to be working. Try to not require stat by checking it is executable first. Should be able to handle both bind-mounted /etc/resolv.conf and atomic move from temp file.

It should work also for issue #19

pemensik avatar Jul 09 '23 23:07 pemensik

That only works on Linux.

rsmarples avatar Jul 10 '23 06:07 rsmarples

Is there any portable check to ensure two files are on the same filesystem, but they are not identical file? Something similar to test -ef , but without inode check? I admit I test different Linux flavours, but do not have other VM to test.

Checked openbsd stat manual. Does it need just %d format instead?

pemensik avatar Jul 10 '23 06:07 pemensik

There is no portable way of working this out. stat format on BSD requires -f, not -c which Linux uses.

rsmarples avatar Jul 10 '23 07:07 rsmarples

Ah. Okay, maybe configure could sort this detail at build time. It would require just trivial check on build and would not clutter those conditions more than necessary.

pemensik avatar Jul 10 '23 07:07 pemensik