Page MenuHomeFreeBSD

D49309.1786489486.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D49309.1786489486.diff

diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -58,6 +58,7 @@
netif \
netoptions \
netwait \
+ newaliases \
newsyslog \
nfsclient \
nfscbd \
diff --git a/libexec/rc/rc.d/newaliases b/libexec/rc/rc.d/newaliases
new file mode 100644
--- /dev/null
+++ b/libexec/rc/rc.d/newaliases
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2025 SRI International
+#
+# This software was developed by SRI International, the University of
+# Cambridge Computer Laboratory (Department of Computer Science and
+# Technology), and Capabilities Limited under Defense Advanced Research
+# Projects Agency (DARPA) Contract No. FA8750-24-C-B047 ("DEC").
+#
+
+# PROVIDE: newaliases
+# REQUIRE: FILESYSTEMS
+# BEFORE: mail
+# KEYWORD: firstboot
+
+. /etc/rc.subr
+
+name="newaliases"
+desc="Create email aliases database if required"
+required_files="/etc/mail/aliases"
+command="/usr/bin/newaliases"
+start_cmd="newaliases_start"
+stop_cmd=":"
+
+load_rc_config $name
+
+newaliases_start()
+{
+ if [ ! -f /etc/mail/aliases ]; then
+ return 0
+ fi
+ if [ ! -f "/etc/mail/aliases.db" ]; then
+ if [ ! -x $command ]; then
+ warn "$command not found"
+ return 1
+ fi
+ $command
+ fi
+}
+
+run_rc_command "$1"

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 11, 11:04 PM (7 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29397326
Default Alt Text
D49309.1786489486.diff (1 KB)

Event Timeline