Change the whoami patch to port better
This commit is contained in:
parent
d1475f69a7
commit
6553d9937e
3 changed files with 29 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.11 2012/08/09 16:32:24 fhajny Exp $
|
||||
$NetBSD: distinfo,v 1.12 2012/08/10 17:16:54 fhajny Exp $
|
||||
|
||||
SHA1 (innostore-1.0.4.tar.gz) = dfbc3b90bac8b3dc930dc05ebd7418fc8a244e5d
|
||||
RMD160 (innostore-1.0.4.tar.gz) = b4ab7ae7538f95366a9115b74689975bd08b3c9e
|
||||
|
@ -11,6 +11,6 @@ SHA1 (patch-deps__ebloom__rebar.config) = f54dd62351e041a2be8d37fd62a169ebd1ecc1
|
|||
SHA1 (patch-deps__erlang_js__c_src__Makefile) = 8f31bdfae317f62dc620a8dd34ba5dcd4fb2cafd
|
||||
SHA1 (patch-package__Makefile) = 53164732f85ea7cdce7638b57cee20af26f79987
|
||||
SHA1 (patch-rel__files__app.config) = 47c4e14740d1401ed3049ee9f091c1099a5cc16f
|
||||
SHA1 (patch-rel__files__riak) = 0a945c3ecdb45228703f3655ecf6e432056f1b88
|
||||
SHA1 (patch-rel__files__riak-admin) = bbdbe657a2b99ddba17298332883d8293c2d9a85
|
||||
SHA1 (patch-rel__files__riak) = 3d319dd9b1c22b2ef89f74a44dbc1124ed96efbe
|
||||
SHA1 (patch-rel__files__riak-admin) = bb0b234695cb6c9254a3dd5331a9328b0b832753
|
||||
SHA1 (patch-rel__vars.config) = b75086ed0a250858b2c1ac3b55b5c5719ecf8fab
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
$NetBSD: patch-rel__files__riak,v 1.3 2012/08/09 16:32:24 fhajny Exp $
|
||||
$NetBSD: patch-rel__files__riak,v 1.4 2012/08/10 17:16:54 fhajny Exp $
|
||||
|
||||
Substitute whoami for id across SunOS platforms.
|
||||
Silence sudo (unneeded screen waste).
|
||||
--- rel/files/riak.orig 2012-08-06 22:02:45.000000000 +0000
|
||||
+++ rel/files/riak
|
||||
@@ -6,10 +6,10 @@
|
||||
if [ `uname -s` = 'SunOS' -a "${POSIX_SHELL}" != "true" ]; then
|
||||
POSIX_SHELL="true"
|
||||
export POSIX_SHELL
|
||||
- # To support 'whoami' add /usr/ucb to path
|
||||
- PATH=/usr/ucb:$PATH
|
||||
- export PATH
|
||||
+ WHOAMI_PROG="/usr/xpg4/bin/id -un"
|
||||
exec /usr/bin/ksh $0 "$@"
|
||||
+else
|
||||
+ WHOAMI_PROG="whoami"
|
||||
@@ -13,6 +13,12 @@ if [ `uname -s` = 'SunOS' -a "${POSIX_SH
|
||||
fi
|
||||
unset POSIX_SHELL # clear it so if we invoke other scripts, they run as ksh as well
|
||||
|
||||
@@ -27,7 +27,7 @@ PLATFORM_DATA_DIR={{platform_data_dir}}
|
||||
+if [ `uname -s` = 'SunOS' ]; then
|
||||
+ WHOAMI_PROG="/usr/xpg4/bin/id -un"
|
||||
+else
|
||||
+ WHOAMI_PROG="whoami"
|
||||
+fi
|
||||
+
|
||||
RUNNER_SCRIPT_DIR={{runner_script_dir}}
|
||||
RUNNER_SCRIPT=${0##*/}
|
||||
|
||||
@@ -27,7 +33,7 @@ PLATFORM_DATA_DIR={{platform_data_dir}}
|
||||
SSL_DIST_CONFIG=$PLATFORM_DATA_DIR/ssl_distribution.args_file
|
||||
RIAK_VERSION="git"
|
||||
|
||||
|
@ -27,7 +26,7 @@ Silence sudo (unneeded screen waste).
|
|||
|
||||
# Make sure this script is running as the appropriate user
|
||||
if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then
|
||||
@@ -36,8 +36,7 @@ if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" !
|
||||
@@ -36,8 +42,7 @@ if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" !
|
||||
echo "sudo doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
$NetBSD: patch-rel__files__riak-admin,v 1.2 2012/08/09 16:32:24 fhajny Exp $
|
||||
$NetBSD: patch-rel__files__riak-admin,v 1.3 2012/08/10 17:16:54 fhajny Exp $
|
||||
|
||||
Substitute whoami for id across SunOS platforms.
|
||||
Silence sudo (unneeded screen waste).
|
||||
--- rel/files/riak-admin.orig 2012-08-06 22:02:45.000000000 +0000
|
||||
+++ rel/files/riak-admin
|
||||
@@ -4,10 +4,10 @@
|
||||
if [ `uname -s` = 'SunOS' -a "${POSIX_SHELL}" != "true" ]; then
|
||||
POSIX_SHELL="true"
|
||||
export POSIX_SHELL
|
||||
- # To support 'whoami' add /usr/ucb to path
|
||||
- PATH=/usr/ucb:$PATH
|
||||
- export PATH
|
||||
+ WHOAMI_PROG="/usr/xpg4/bin/id -un"
|
||||
exec /usr/bin/ksh $0 "$@"
|
||||
+else
|
||||
+ WHOAMI_PROG="whoami"
|
||||
@@ -11,6 +11,12 @@ if [ `uname -s` = 'SunOS' -a "${POSIX_SH
|
||||
fi
|
||||
unset POSIX_SHELL # clear it so if we invoke other scripts, they run as ksh as well
|
||||
|
||||
@@ -20,7 +20,7 @@ RUNNER_LIB_DIR={{platform_lib_dir}}
|
||||
+if [ `uname -s` = 'SunOS' ]; then
|
||||
+ WHOAMI_PROG="/usr/xpg4/bin/id -un"
|
||||
+else
|
||||
+ WHOAMI_PROG="whoami"
|
||||
+fi
|
||||
+
|
||||
RUNNER_SCRIPT_DIR={{runner_script_dir}}
|
||||
RUNNER_SCRIPT=${0##*/}
|
||||
|
||||
@@ -20,7 +26,7 @@ RUNNER_LIB_DIR={{platform_lib_dir}}
|
||||
RUNNER_LOG_DIR={{runner_log_dir}}
|
||||
RUNNER_USER={{runner_user}}
|
||||
|
||||
|
@ -27,7 +26,7 @@ Silence sudo (unneeded screen waste).
|
|||
|
||||
# Make sure this script is running as the appropriate user
|
||||
if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then
|
||||
@@ -29,8 +29,7 @@ if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" !
|
||||
@@ -29,8 +35,7 @@ if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" !
|
||||
echo "sudo doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue