Skip to content

Commit

Permalink
Support for runonly plugin 0piboot
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbls committed Aug 19, 2024
1 parent b0d2a6b commit a5d92a6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions sdm-cparse
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,30 @@ function runplugins_exit() {
runplugins "$1" $phase "$xargv" && return || exit
}

function live0scripts() {
#
# Clear or run plugin boot scripts on the running system
#
# $1: path to clear or run (eg /etc/sdm/0piboot/*.sh)
#
local fni="$1" op=$2
local fbn ffn fpn

while read ffn
do
if [ "$op" == "run" ]
then
chmod 755 $ffn
logtoboth "* Run plugin FirstBoot script '$ffn'"
bash $ffn
fi
fbn=$(basename $ffn)
fpn=$(dirname $ffn)
rm -f $fpn/.$fbn
mv $ffn $fpn/.$fbn
done < <(compgen -G "$fni")
}

function ispluginselected() {
#
# Returns true if plugin name in $1 is on the command line
Expand Down

0 comments on commit a5d92a6

Please sign in to comment.