summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-08-27 16:33:32 +0800
committerJeremy Kerr <jk@ozlabs.org>2015-08-27 16:33:32 +0800
commit0b71e584078dbe370ed37bcc26f2815d138d28fc (patch)
tree41c17fae060d9e12e39ff8ac5afc61b1e53ae602 /utils
parentcb4a99c73726f316180f1591deb2f23900226920 (diff)
downloadpetitboot-0b71e584078dbe370ed37bcc26f2815d138d28fc.zip
petitboot-0b71e584078dbe370ed37bcc26f2815d138d28fc.tar.gz
pb-plugin: Move plugin wrappers to a separate dir
Use /var/lib/pb-plugins/bin, to prevent overwriting system binaries. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'utils')
-rw-r--r--utils/pb-console2
-rwxr-xr-xutils/pb-plugin4
2 files changed, 4 insertions, 2 deletions
diff --git a/utils/pb-console b/utils/pb-console
index 36b9c03..5f8ffa6 100644
--- a/utils/pb-console
+++ b/utils/pb-console
@@ -107,7 +107,7 @@ esac
# 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
diff --git a/utils/pb-plugin b/utils/pb-plugin
index 598530a..1f8a591 100755
--- a/utils/pb-plugin
+++ b/utils/pb-plugin
@@ -7,7 +7,7 @@ plugin_file=pb-plugin.cpio.gz
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()
{
@@ -98,6 +98,8 @@ __create_wrapper()
binary=$2
wrapper=$plugin_wrapper_dir/$(basename $binary)
+ mkdir -p $plugin_wrapper_dir
+
cat <<EOF > $wrapper
#!/bin/sh
OpenPOWER on IntegriCloud