> My current attempt looks like this, but I believe it may not be the correct
> way.
If I read the code in /etc/init.d/lvm correctly the exact return code of
dm_in_proc is not important. So if you just want to check if all commands
succeeded forx -o0 is all you need:
foreground {
forx -E -p -o0 i { devices misc }
grep -qs test /proc/$i
}
importas -u dm_in_proc ?
echo ${dm_in_proc}
If you use the value for a single if statment this is the shortest way:
if {
forx -E -p -o0 i { devices misc }
grep -qs test /proc/$i
}
Received on Thu Sep 05 2024 - 02:47:52 CEST