Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse rc.local.d directory on boot #474

Merged
merged 1 commit into from Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions init/setup-rw.sh
Expand Up @@ -31,7 +31,12 @@ if mountpoint -q /rw ; then
# This script will be executed at every VM startup, you can place your own
# custom commands here. This includes overriding some configuration in /etc,
# starting services etc.

#
# Executable scripts located in /rw/config/rc.local.d with the extension
# '.rc' are executed immediately before this rc.local.
# Example:
# /rw/config/rc.local.d/custom.rc
#
# Example for overriding the whole CUPS configuration:
# rm -rf /etc/cups
# ln -s /rw/config/cups /etc/cups
Expand All @@ -49,7 +54,7 @@ EOF
#
# It is a good place for custom rules and actions that should occur when the
# firewall service is started.
#
#
# Executable scripts located in /rw/config/qubes-firewall.d are executed
# immediately before this qubes-firewall-user-script.
EOF
Expand Down
9 changes: 6 additions & 3 deletions vm-systemd/misc-post.sh
Expand Up @@ -11,6 +11,9 @@ if [ -n "$(ls -A /usr/local/lib 2>/dev/null)" ] || \
ldconfig
fi

if [ -x /rw/config/rc.local ] ; then
/rw/config/rc.local
fi
for rc in /rw/config/rc.local.d/*.rc /rw/config/rc.local; do
[ -f "${rc}" ] || continue
[ -x "${rc}" ] || continue
"${rc}"
done
unset rc