Hello everyone!
I'm quite new to execline (and mailing lists) an would like help porting
this function to execline. It's /etc/init.d/lvm from openrc.
dm_in_proc() {
local rc=0 i=
for i in devices misc; do
grep -qs 'device-mapper' /proc/$i
rc=$(($rc + $?))
done
return $rc
}
My current attempt looks like this, but I believe it may not be the correct
way.
backtick -E dm_in_proc {
foreground {
forx -x0 -E -p i { devices misc }
if -x1 {
execl-cmdline -s { grep -qs "device-mapper" /proc/$i }
}
}
importas -u ? ?
echo $?
}
Received on Thu Sep 05 2024 - 02:16:05 CEST