Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/474'
Browse files Browse the repository at this point in the history
* origin/pr/474:
  Parse '.rc' files in rc.local.d directory on boot
  • Loading branch information
marmarek committed Dec 4, 2023
2 parents 4ec4c79 + e40a621 commit ef3b3d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 7 additions & 2 deletions init/setup-rw.sh
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit ef3b3d5

Please sign in to comment.