--- /usr.sbin/bsdconfig/share/sysrc.subr.orig 2019-08-30 13:16:04.604403000 +0000 +++ /usr.sbin/bsdconfig/share/sysrc.subr 2019-08-30 13:14:55.058956000 +0000 @@ -560,7 +560,7 @@ f_sysrc_set() # if [ "$not_found" ]; then # Add a newline if missing before appending to the file - awk 'BEGIN { wc = 0 } NR == 1 { + [ ! -e "$file" ] || awk 'BEGIN { wc = 0 } NR == 1 { (cmd = "wc -l " FILENAME) | getline close(cmd) wc = $1