rset(1) : Formulas

Check and Install

Sometimes it's helpful to verify configuration before installing it. This can be done for any daemmon with a check/test mode.

Keep in mind that the exit status of rinstall(1) indicates weather the target file was installed or updated

./rinstall src/xyz dst/xyz && echo "target updated"
./rinstall src/xyz dst/xyz || echo "target not updated""

sshd_config

The simplest method is to abort early

sshd:
   sshd -t -f etc/sshd_config || exit 1
   ./rinstall -m 0644 etc/sshd_config /etc/ssh/sshd_config

Or print an error message without installing the file

sshd:
   sshd -t -f etc/sshd_config && \
     ./rinstall -m 0644 etc/sshd_config /etc/ssh/sshd_config