Skip to content

Commit 0a4df2c

Browse files
authored
Merge pull request #155 from KeithMnemonic/update_rpm_spec_file_to_keep_symlinks_when_upgrading
Update rpm spec file to ensure the symlinks are kept during an upgrade
2 parents 2e81bde + e1b4a1b commit 0a4df2c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.swp
22
*.swo
3+
dist/
4+
.vscode/

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# NVIDIA MIG Manager Changelog
22

3+
- Fix rpm spec to maintain the config.yaml and hooks.yaml symlinks during an update
4+
35
## v0.10.0
46
- Add GH200 144G HBM3e with PCI ID x234810DE
57
- Bump Golang version to v1.23.2

deployments/systemd/packages/rpm/SPECS/nvidia-mig-manager.spec

+7-5
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ maybe_add_hooks_symlink
112112
maybe_add_config_symlink
113113

114114
%preun
115-
systemctl disable nvidia-mig-manager.service
116-
systemctl daemon-reload
117-
118115
function maybe_remove_hooks_symlink() {
119116
local target=$(readlink -f /etc/nvidia-mig-manager/hooks.yaml)
120117
if [ "${target}" = "/etc/nvidia-mig-manager/hooks-minimal.yaml" ]; then
@@ -132,8 +129,13 @@ function maybe_remove_config_symlink() {
132129
fi
133130
}
134131

135-
maybe_remove_hooks_symlink
136-
maybe_remove_config_symlink
132+
if [ $1 -eq 0 ]
133+
then
134+
systemctl disable nvidia-mig-manager.service
135+
systemctl daemon-reload
136+
maybe_remove_hooks_symlink
137+
maybe_remove_config_symlink
138+
fi
137139

138140
%changelog
139141
# As of 0.6.0-1 we generate the release information automatically

0 commit comments

Comments
 (0)