diff options
Diffstat (limited to 'backup.c')
-rw-r--r-- | backup.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -49,6 +49,8 @@ #define BACKUP_DIRECTORY "/var/lib/nvidia" #define BACKUP_LOG (BACKUP_DIRECTORY "/log") +#define RMMOD_MODULE_NAME "nvidia" + /* * XXX when uninstalling should we remove directories that were * created by our installation? @@ -117,7 +119,6 @@ typedef struct { } BackupInfo; - static BackupInfo *read_backup_log_file(Options *op); static int check_backup_log_entries(Options *op, BackupInfo *b); @@ -498,7 +499,7 @@ static int do_uninstall(Options *op) BackupLogEntry *e; BackupInfo *b; int i, len, ok; - char *tmpstr; + char *tmpstr, *cmd; float percent; static const char existing_installation_is_borked[] = @@ -656,6 +657,15 @@ static int do_uninstall(Options *op) /* XXX what to do if this fails?... nothing */ } + /* + * attempt to unload the kernel module, but don't abort if this fails: the + * kernel may not have been configured with support for module unloading + * (Linux 2.6) or the user might have unloaded it themselves. + */ + cmd = nvstrcat(op->utils[RMMOD], " ", RMMOD_MODULE_NAME, NULL); + run_command(op, cmd, NULL, FALSE, 0, TRUE); + nvfree(cmd); + run_distro_hook(op, "post-uninstall"); return TRUE; |