File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,10 +75,16 @@ function nvidia-mig-manager::service::clear_reboot_state() {
7575
7676function nvidia-mig-manager::service::persist_config_across_reboot() {
7777 local selected_config=" ${1} "
78- cat << EOF > /etc/systemd/system/nvidia-mig-manager.service.d/override.conf
79- [Service]
80- Environment="MIG_PARTED_SELECTED_CONFIG=${selected_config} "
81- EOF
78+ {
79+ echo " [Service]"
80+ if [ -n " ${MIG_PARTED_CONFIG_FILE} " ]; then
81+ echo " Environment=\" MIG_PARTED_CONFIG_FILE=${MIG_PARTED_CONFIG_FILE} \" "
82+ fi
83+ if [ -n " ${MIG_PARTED_HOOKS_FILE} " ]; then
84+ echo " Environment=\" MIG_PARTED_HOOKS_FILE=${MIG_PARTED_HOOKS_FILE} \" "
85+ fi
86+ echo " Environment=\" MIG_PARTED_SELECTED_CONFIG=${selected_config} \" "
87+ } > /etc/systemd/system/nvidia-mig-manager.service.d/override.conf
8288 systemctl daemon-reload
8389}
8490
You can’t perform that action at this time.
0 commit comments