hacks/fix-raspian-defaults/root/usr/lib/raspi-ini/run-parts.sh

16 lines
379 B
Bash
Raw Normal View History

2019-10-04 12:55:40 +00:00
#!/bin/bash
# Prevent *.sh from returning itself if there are no matches
shopt -s nullglob
# Run every per-once script
2019-10-04 13:41:13 +00:00
run-parts --regex '.*\.sh$' /boot/per-once.d |
2019-10-04 12:55:40 +00:00
# Rename every per-once script
for f in /boot/per-once.d/*.sh; do
mv $f $(dirname $f)/$(basename $f .sh).$(date +%F@%H.%M.%S)
done
# Run every per-boot script
run-parts --regex '.*\.sh$' /boot/per-boot.d