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""


The simplest method is to abort early

   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 -t -f etc/sshd_config && \
     ./rinstall -m 0644 etc/sshd_config /etc/ssh/sshd_config