Skip to content

Commit a5d92a6

Browse files
committed
Support for runonly plugin 0piboot
1 parent b0d2a6b commit a5d92a6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sdm-cparse

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,30 @@ function runplugins_exit() {
677677
runplugins "$1" $phase "$xargv" && return || exit
678678
}
679679

680+
function live0scripts() {
681+
#
682+
# Clear or run plugin boot scripts on the running system
683+
#
684+
# $1: path to clear or run (eg /etc/sdm/0piboot/*.sh)
685+
#
686+
local fni="$1" op=$2
687+
local fbn ffn fpn
688+
689+
while read ffn
690+
do
691+
if [ "$op" == "run" ]
692+
then
693+
chmod 755 $ffn
694+
logtoboth "* Run plugin FirstBoot script '$ffn'"
695+
bash $ffn
696+
fi
697+
fbn=$(basename $ffn)
698+
fpn=$(dirname $ffn)
699+
rm -f $fpn/.$fbn
700+
mv $ffn $fpn/.$fbn
701+
done < <(compgen -G "$fni")
702+
}
703+
680704
function ispluginselected() {
681705
#
682706
# Returns true if plugin name in $1 is on the command line

0 commit comments

Comments
 (0)