Skip to content

Commit f0e93e6

Browse files
committed
Parse rc.local.d directory on boot
Fixes QubesOS/qubes-issues#8690
1 parent 5a29270 commit f0e93e6

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

init/setup-rw.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ if mountpoint -q /rw ; then
3131
# This script will be executed at every VM startup, you can place your own
3232
# custom commands here. This includes overriding some configuration in /etc,
3333
# starting services etc.
34-
34+
#
35+
# Executable scripts located in /rw/config/rc.local.d are executed
36+
# immediately before this rc.local.
37+
#
3538
# Example for overriding the whole CUPS configuration:
3639
# rm -rf /etc/cups
3740
# ln -s /rw/config/cups /etc/cups
@@ -49,7 +52,7 @@ EOF
4952
#
5053
# It is a good place for custom rules and actions that should occur when the
5154
# firewall service is started.
52-
#
55+
#
5356
# Executable scripts located in /rw/config/qubes-firewall.d are executed
5457
# immediately before this qubes-firewall-user-script.
5558
EOF

vm-systemd/misc-post.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ if [ -n "$(ls -A /usr/local/lib 2>/dev/null)" ] || \
1111
ldconfig
1212
fi
1313

14-
if [ -x /rw/config/rc.local ] ; then
15-
/rw/config/rc.local
16-
fi
14+
for init_script in /rw/config/rc.local.d/* /rw/config/rc.local; do
15+
[ -f "${init_script}" ] || continue
16+
[ -x "${init_script}" ] || continue
17+
"${init_script}"
18+
done

0 commit comments

Comments
 (0)