Differential D40119 Diff 122094 emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh
Changeset View
Changeset View
Standalone View
Standalone View
emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh
Show All 10 Lines | |||||
+# available from http://www.virtualbox.org. This file is free software; | +# available from http://www.virtualbox.org. This file is free software; | ||||
+# you can redistribute it and/or modify it under the terms of the GNU | +# you can redistribute it and/or modify it under the terms of the GNU | ||||
+# General Public License (GPL) as published by the Free Software | +# General Public License (GPL) as published by the Free Software | ||||
+# Foundation, in version 2 as it comes in the "COPYING" file of the | +# Foundation, in version 2 as it comes in the "COPYING" file of the | ||||
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the | +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the | ||||
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. | +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. | ||||
+# | +# | ||||
+ | + | ||||
+PATH="/usr/bin:/bin:/usr/sbin:/sbin" | +PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin" | ||||
adamw: I'm not sure that putting `/usr/local/` before base is good practice. With this patch, a… | |||||
Done Inline ActionsMy 1st version before upload here was: vvd: My 1st version before upload here was:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin… | |||||
Done Inline ActionsI always start with what FreeBSD itself uses (from /etc/login.conf, and I skip ~/bin of course): $ awk '/path/ {print;exit;}' /etc/login.conf :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ At the end of the day, you're the committer. Don't be afraid to modify patches from submitters; they're counting on you for that. Most submitters see changes in the final patch as a learning opportunity. adamw: I always start with what FreeBSD itself uses (from `/etc/login.conf`, and I skip `~/bin` of… | |||||
+CONFIG="/usr/local/etc/vbox/vbox.cfg" | +CONFIG="%%VBOX_ETC%%/vbox.cfg" | ||||
Not Done Inline ActionsHere %%PREFIX should be used, I believe. arrowd: Here `%%PREFIX` should be used, I believe. | |||||
+ | + | ||||
+test -r "${CONFIG}" && | +test -r "${CONFIG}" && | ||||
+ . "${CONFIG}" | + . "${CONFIG}" | ||||
+test -z "${INSTALL_DIR}" && | +test -z "${INSTALL_DIR}" && | ||||
+ if test -d /usr/local/lib/virtualbox && | + if test -d %%VBOX_DIR%% && | ||||
+ test -f /usr/local/lib/virtualbox/VBoxRT.so; then | + test -f %%VBOX_DIR%%/VBoxRT.so; then | ||||
+ INSTALL_DIR=/usr/local/lib/virtualbox | + INSTALL_DIR=%%VBOX_DIR%% | ||||
+ else | + else | ||||
+ echo "Could not find VirtualBox installation. Please reinstall." | + echo "Could not find VirtualBox installation. Please reinstall." | ||||
+ exit 1 | + exit 1 | ||||
+ fi | + fi | ||||
+ | + | ||||
+# workaround for the KDE dialog problem | +# workaround for the KDE dialog problem | ||||
+KDE_FORK_SLAVES=1; export KDE_FORK_SLAVES | +KDE_FORK_SLAVES=1; export KDE_FORK_SLAVES | ||||
+ | + | ||||
Show All 32 Lines |
I'm not sure that putting /usr/local/ before base is good practice. With this patch, a malicious /usr/local/bin/mount could be called instead of /sbin/mount. Would we be better off putting /usr/local/... at the end instead?