diff options
author | Bryan McLellan <btm@loftninjas.org> | 2015-12-16 19:46:46 -0500 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2015-12-16 19:46:46 -0500 |
commit | 65a4c9cd036219d5d30bc08f15db3685022c79cf (patch) | |
tree | 9b4b7360d3a2804d873455672560f1d5aef26e03 | |
parent | 8153e5e074fa59503eac97576466616d30252a82 (diff) | |
parent | fac832617dc4d0246e84177f5cc8732e306724c5 (diff) | |
download | chef-65a4c9cd036219d5d30bc08f15db3685022c79cf.tar.gz |
Merge pull request #566 from chef/btm/fix-postinst
solaris sh compatible verify-chef.sh
-rwxr-xr-x | jenkins/verify-chef.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/jenkins/verify-chef.sh b/jenkins/verify-chef.sh index 9459c9efe6..4143e639a4 100755 --- a/jenkins/verify-chef.sh +++ b/jenkins/verify-chef.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # $PROJECT_NAME is set by Jenkins, this allows us to use the same script to verify # Chef and Angry Chef @@ -23,22 +23,23 @@ fi export USR_BIN_DIR # sanity check that we're getting the correct symlinks from the pre-install script -if [ `readlink $USR_BIN_DIR/chef-client` != "$BIN_DIR/chef-client" ]; then +# solaris doesn't have readlink or test -e. proceed with caution. +if [ ! -L $USR_BIN_DIR/chef-client ] || [ `ls -n $USR_BIN_DIR/chef-client | awk '{print$NF}'` != "$BIN_DIR/chef-client" ]; then echo "$USR_BIN_DIR/chef-client symlink to $BIN_DIR/chef-client was not correctly created by the pre-install script!" exit 1 fi -if [ `readlink $USR_BIN_DIR/knife` != "$BIN_DIR/knife" ]; then +if [ ! -L $USR_BIN_DIR/knife ] || [ `ls -n $USR_BIN_DIR/knife | awk '{print$NF}'` != "$BIN_DIR/knife" ]; then echo "$USR_BIN_DIR/knife symlink to $BIN_DIR/knife was not correctly created by the pre-install script!" exit 1 fi -if [ `readlink $USR_BIN_DIR/chef-solo` != "$BIN_DIR/chef-solo" ]; then +if [ ! -L $USR_BIN_DIR/chef-solo ] || [ `ls -n $USR_BIN_DIR/chef-solo | awk '{print$NF}'` != "$BIN_DIR/chef-solo" ]; then echo "$USR_BIN_DIR/chef-solo symlink to $BIN_DIR/chef-solo was not correctly created by the pre-install script!" exit 1 fi -if [ `readlink $USR_BIN_DIR/ohai` != "$BIN_DIR/ohai" ]; then +if [ ! -L $USR_BIN_DIR/ohai ] || [ `ls -n $USR_BIN_DIR/ohai | awk '{print$NF}'` != "$BIN_DIR/ohai" ]; then echo "$USR_BIN_DIR/ohai symlink to $BIN_DIR/ohai was not correctly created by the pre-install script!" exit 1 fi |