File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ _create_driver_package() (
189189
190190# Check if imex node config is present
191191_assert_imex_node_config () {
192- [ -f /etc/nvidia-imex/node_config .cfg ] ] || return 1
192+ [ -f /etc/nvidia-imex/nodes_config .cfg ] || return 1
193193}
194194
195195_assert_nvswitch_system () {
@@ -333,7 +333,7 @@ _load_driver() {
333333
334334 if _assert_imex_node_config; then
335335 echo " Starting NVIDIA imex daemon..."
336- systemctl start nvidia-imex.service
336+ /usr/bin/nvidia-imex -c /etc/ nvidia-imex/config.cfg
337337 fi
338338
339339 return 0
@@ -394,9 +394,10 @@ _unload_driver() {
394394 fi
395395
396396 # stop nvidia-imex daemon
397- if [ systemctl is-active --quiet nvidia-imex.service ]; then
398- echo " Stopping NVIDIA imex daemon..."
399- systemctl stop nvidia-imex.service
397+ local imex_pid=$( pgrep -f /usr/bin/nvidia-imex)
398+ if [ -n " ${imex_pid} " ]; then
399+ echo " Stopping NVIDIA imex daemon..."
400+ kill -SIGTERM " ${imex_pid} "
400401 fi
401402
402403 echo " Unloading NVIDIA driver kernel modules..."
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ _update_package_cache() {
2323}
2424
2525_assert_imex_node_config () {
26- [ -f /etc/nvidia-imex/node_config .cfg ] ] || return 1
26+ [ -f /etc/nvidia-imex/nodes_config .cfg ] || return 1
2727}
2828
2929_assert_nvswitch_system () {
@@ -135,7 +135,7 @@ _load_driver() {
135135
136136 if _assert_imex_node_config; then
137137 echo " Starting NVIDIA imex daemon..."
138- systemctl start nvidia-imex.service
138+ /usr/bin/ nvidia-imex -c /etc/nvidia-imex/config.cfg
139139 fi
140140
141141 return 0
@@ -179,10 +179,11 @@ _unload_driver() {
179179 return 1
180180 fi
181181 fi
182-
183- if [ systemctl is-active --quiet nvidia-imex.service ]; then
184- echo " Stopping NVIDIA imex daemon..."
185- systemctl stop nvidia-imex.service
182+ # stop nvidia-imex daemon
183+ local imex_pid=$( pgrep -f /usr/bin/nvidia-imex)
184+ if [ -n " ${imex_pid} " ]; then
185+ echo " Stopping NVIDIA imex daemon..."
186+ kill -SIGTERM " ${imex_pid} "
186187 fi
187188
188189 echo " Unloading NVIDIA driver kernel modules..."
You can’t perform that action at this time.
0 commit comments