Use /var/lib/pb-plugins/bin, to prevent overwriting system binaries.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
# we may have been run from udev - ensure we have a sensible PATH
if [ -z "$PATH" ]
then
- PATH=/usr/bin:/usr/sbin:/bin:/sbin
+ PATH=/var/lib/pb-plugins/bin:/usr/bin:/usr/sbin:/bin:/sbin
fi
export PATH
plugin_meta=pb-plugin.conf
plugin_meta_dir=etc/preboot-plugins/
plugin_meta_path=$plugin_meta_dir$plugin_meta
-plugin_wrapper_dir=/usr/bin
+plugin_wrapper_dir=/var/lib/pb-plugins/bin
usage()
{
binary=$2
wrapper=$plugin_wrapper_dir/$(basename $binary)
+ mkdir -p $plugin_wrapper_dir
+
cat <<EOF > $wrapper
#!/bin/sh