Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4abd3ebedb | ||
|
|
f765436dde | ||
|
|
b5c513b4b5 | ||
|
|
ee761ff098 | ||
|
|
27c22deb6c | ||
|
|
681a9f7e61 | ||
|
|
8335a2b1ba | ||
|
|
407425ca78 | ||
|
|
6ca505b4cd | ||
|
|
612eae5e21 | ||
|
|
497b5ea1eb | ||
|
|
cd384e0d59 | ||
|
|
8921cac35b | ||
|
|
cc4306492e | ||
|
|
6042783e82 | ||
|
|
b7b3a9f898 | ||
|
|
15643dcb3f |
@@ -1,3 +1,20 @@
|
|||||||
|
## 0.56.0 (2012-08-19)
|
||||||
|
|
||||||
|
* read .profile, not .profile.d [David Dollar]
|
||||||
|
|
||||||
|
## 0.55.0 (2012-08-14)
|
||||||
|
|
||||||
|
* use a forked process to exec a run with environment [David Dollar]
|
||||||
|
|
||||||
|
## 0.54.0 (2012-08-14)
|
||||||
|
|
||||||
|
* use Foreman::Process to extract command running [David Dollar]
|
||||||
|
* changed to check env for bash [brntbeer]
|
||||||
|
|
||||||
|
## 0.53.0 (2012-07-24)
|
||||||
|
|
||||||
|
* put app root in $HOME [David Dollar]
|
||||||
|
|
||||||
## 0.52.0 (2012-07-24)
|
## 0.52.0 (2012-07-24)
|
||||||
|
|
||||||
* wrap command in a runner that sources .profile.d scripts [David Dollar]
|
* wrap command in a runner that sources .profile.d scripts [David Dollar]
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
foreman (0.53.0)
|
foreman (0.57.0)
|
||||||
thor (>= 0.13.6)
|
thor (>= 0.13.6)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|||||||
+7
-10
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
#/ Usage: foreman-runner [-d <dir>] [-p] <command> [<args>...]
|
#/ Usage: foreman-runner [-d <dir>] [-p] <command> [<args>...]
|
||||||
#/
|
#/
|
||||||
@@ -16,12 +16,12 @@ usage() {
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
read_profiled=""
|
read_profile=""
|
||||||
|
|
||||||
while getopts ":hd:p" OPT; do
|
while getopts ":hd:p" OPT; do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
d) cd "$OPTARG" ;;
|
d) cd "$OPTARG" ;;
|
||||||
p) read_profiled="1" ;;
|
p) read_profile="1" ;;
|
||||||
h) usage ;;
|
h) usage ;;
|
||||||
\?) error "invalid option: -$OPTARG" ;;
|
\?) error "invalid option: -$OPTARG" ;;
|
||||||
:) error "option -$OPTARG requires an argument" ;;
|
:) error "option -$OPTARG requires an argument" ;;
|
||||||
@@ -32,13 +32,10 @@ shift $((OPTIND-1))
|
|||||||
|
|
||||||
[ -z "$1" ] && usage
|
[ -z "$1" ] && usage
|
||||||
|
|
||||||
if [ "$read_profiled" == "1" ]; then
|
if [ "$read_profile" == "1" ]; then
|
||||||
shopt -s nullglob
|
if [ -f .profile ]; then
|
||||||
for script in .profile.d/*; do
|
source .profile
|
||||||
echo "sourcing $script"
|
fi
|
||||||
source $script
|
|
||||||
done
|
|
||||||
shopt -u nullglob
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -7,5 +7,10 @@ EOF
|
|||||||
|
|
||||||
end script
|
end script
|
||||||
|
|
||||||
start on started network
|
start on (started network-interface
|
||||||
stop on stopping network
|
or started network-manager
|
||||||
|
or started networking)
|
||||||
|
|
||||||
|
stop on (stopping network-interface
|
||||||
|
or stopping network-manager
|
||||||
|
or stopping networking)
|
||||||
|
|||||||
+10
-6
@@ -75,13 +75,17 @@ class Foreman::CLI < Thor
|
|||||||
|
|
||||||
def run(*args)
|
def run(*args)
|
||||||
load_environment!
|
load_environment!
|
||||||
begin
|
pid = fork do
|
||||||
exec engine.env, args.shelljoin
|
begin
|
||||||
rescue Errno::EACCES
|
engine.env.each { |k,v| ENV[k] = v }
|
||||||
error "not executable: #{args.first}"
|
exec args.shelljoin
|
||||||
rescue Errno::ENOENT
|
rescue Errno::EACCES
|
||||||
error "command not found: #{args.first}"
|
error "not executable: #{args.first}"
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
error "command not found: #{args.first}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Process.wait(pid)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "version", "Display Foreman gem version"
|
desc "version", "Display Foreman gem version"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module Foreman
|
module Foreman
|
||||||
|
|
||||||
VERSION = "0.53.0"
|
VERSION = "0.57.0"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,5 +7,10 @@ EOF
|
|||||||
|
|
||||||
end script
|
end script
|
||||||
|
|
||||||
start on started network
|
start on (started network-interface
|
||||||
stop on stopping network
|
or started network-manager
|
||||||
|
or started networking)
|
||||||
|
|
||||||
|
stop on (stopping network-interface
|
||||||
|
or stopping network-manager
|
||||||
|
or stopping networking)
|
||||||
|
|||||||
Reference in New Issue
Block a user