File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -104,14 +104,23 @@ or placed in a file `~/.callhostrc` (automatically detected and sourced by `call
104
104
` ` ` bash
105
105
export CALL_HOST_STATUS=${CALL_HOST_STATUS:= disable}
106
106
` ` `
107
- Then to enable it temporarily:
107
+ Use the dedicated toggle to enable it for the rest of your session (or until another toggle is called):
108
+ ` ` ` bash
109
+ call_host_enable
110
+ ` ` `
111
+ or just enable it for one container invocation:
108
112
` ` ` bash
109
113
CALL_HOST_STATUS=enable cmssw-el7 ...
110
114
` ` `
111
- * Instead, if you have this enabled by default and you want to temporarily disable this for a specific container invocation:
115
+ * Instead, if you have this enabled by default and want to disable it on the fly:
116
+ Use the dedicated toggle to disable it for the rest of your session (or until another toggle is called):
117
+ ` ` ` bash
118
+ call_host_disable
119
+ ` ` `
120
+ or just disable it for one container invocation:
112
121
` ` ` bash
113
122
CALL_HOST_STATUS=disable cmssw-el7 ...
114
- ` ` ` `
123
+ ` ` `
115
124
116
125
# ## Caveats
117
126
Original file line number Diff line number Diff line change 40
40
# ensure the pipe dir is bound
41
41
export APPTAINER_BIND=${APPTAINER_BIND}${APPTAINER_BIND: +,}${CALL_HOST_DIR}
42
42
43
+ # enable/disable toggles
44
+ call_host_enable (){
45
+ export CALL_HOST_STATUS=enable
46
+ }
47
+ export -f call_host_enable
48
+ call_host_disable (){
49
+ export CALL_HOST_STATUS=disable
50
+ }
51
+ export -f call_host_disable
52
+
43
53
# concept based on https://stackoverflow.com/questions/32163955/how-to-run-shell-script-on-host-from-docker-container
44
54
45
55
# execute command sent to host pipe; send output to container pipe; store exit code
You can’t perform that action at this time.
0 commit comments