From 0b71e584078dbe370ed37bcc26f2815d138d28fc Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 27 Aug 2015 16:33:32 +0800 Subject: 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 --- utils/pb-console | 2 +- utils/pb-plugin | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'utils') 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 < $wrapper #!/bin/sh -- cgit v1.2.1