| ... | ... |
@@ -41,6 +41,9 @@ function short_source {
|
| 41 | 41 |
file=${file#$RC_DIR/}
|
| 42 | 42 |
printf "%-40s " "$file:${called[1]}:${called[0]}"
|
| 43 | 43 |
} |
| 44 |
+# PS4 is exported to child shells and uses the 'short_source' function, so |
|
| 45 |
+# export it so child shells have access to the 'short_source' function also. |
|
| 46 |
+export -f short_source |
|
| 44 | 47 |
|
| 45 | 48 |
|
| 46 | 49 |
# Retrieve an image from a URL and upload into Glance. |
| ... | ... |
@@ -240,7 +240,6 @@ echo "$STACK_USER ALL=(root) NOPASSWD:ALL" >$TEMPFILE |
| 240 | 240 |
# see them by forcing ``PATH`` |
| 241 | 241 |
echo "Defaults:$STACK_USER secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin" >> $TEMPFILE |
| 242 | 242 |
echo "Defaults:$STACK_USER !requiretty" >> $TEMPFILE |
| 243 |
-echo "Defaults env_keep += PS4" >> $TEMPFILE |
|
| 244 | 243 |
chmod 0440 $TEMPFILE |
| 245 | 244 |
sudo chown root:root $TEMPFILE |
| 246 | 245 |
sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh |
| ... | ... |
@@ -22,6 +22,9 @@ function short_source {
|
| 22 | 22 |
file=${file#$RC_DIR/}
|
| 23 | 23 |
printf "%-40s " "$file:${called[1]}:${called[0]}"
|
| 24 | 24 |
} |
| 25 |
+# PS4 is exported to child shells and uses the 'short_source' function, so |
|
| 26 |
+# export it so child shells have access to the 'short_source' function also. |
|
| 27 |
+export -f short_source |
|
| 25 | 28 |
|
| 26 | 29 |
set -o xtrace |
| 27 | 30 |
|