Module Name: src Committed By: kre Date: Mon Dec 25 08:24:58 UTC 2023
Modified Files: src/etc/rc.d: ipfs Log Message: Clean up obsolete test(1) usage, use sh && rather than test's old -a (and while here prefer sh's ! operator over test's - it simplifies things for test). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/etc/rc.d/ipfs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/etc/rc.d/ipfs diff -u src/etc/rc.d/ipfs:1.8 src/etc/rc.d/ipfs:1.9 --- src/etc/rc.d/ipfs:1.8 Sun Sep 23 07:24:19 2018 +++ src/etc/rc.d/ipfs Mon Dec 25 08:24:58 2023 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: ipfs,v 1.8 2018/09/23 07:24:19 maxv Exp $ +# $NetBSD: ipfs,v 1.9 2023/12/25 08:24:58 kre Exp $ # # PROVIDE: ipfs @@ -17,7 +17,8 @@ stop_cmd="ipfs_stop" ipfs_start() { - if [ -r /var/db/ipf/ipstate.ipf -a -r /var/db/ipf/ipnat.ipf ]; then + if [ -r /var/db/ipf/ipstate.ipf ] && [ -r /var/db/ipf/ipnat.ipf ] + then /usr/sbin/ipfs -R ${rc_flags} rm -f /var/db/ipf/ipstate.ipf /var/db/ipf/ipnat.ipf fi @@ -25,7 +26,7 @@ ipfs_start() ipfs_stop() { - if [ ! -d /var/db/ipf ]; then + if ! [ -d /var/db/ipf ]; then mkdir /var/db/ipf chmod 700 /var/db/ipf chown root:wheel /var/db/ipf