openresolv
openresolv copied to clipboard
Add resolv_conf_mv=auto option
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
That only works on Linux.
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?
There is no portable way of working this out. stat format on BSD requires -f, not -c which Linux uses.
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.