diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-12-02 15:22:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-12-02 15:22:35 +0000 |
commit | b08dab6f1a6775ebe077bf0e135bd12811cacd36 (patch) | |
tree | c24fc2e5db251353113c2361688f30ced1201ddd /perl-install/any.pm | |
parent | c83f743fe269a2aecfa03df12bfe698800296455 (diff) | |
download | drakx-backup-do-not-use-b08dab6f1a6775ebe077bf0e135bd12811cacd36.tar drakx-backup-do-not-use-b08dab6f1a6775ebe077bf0e135bd12811cacd36.tar.gz drakx-backup-do-not-use-b08dab6f1a6775ebe077bf0e135bd12811cacd36.tar.bz2 drakx-backup-do-not-use-b08dab6f1a6775ebe077bf0e135bd12811cacd36.tar.xz drakx-backup-do-not-use-b08dab6f1a6775ebe077bf0e135bd12811cacd36.zip |
create fix_broken_alternatives()
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index baf5b6e65..84685dd83 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -861,6 +861,17 @@ UNREGISTER ^$devfs_if\$ EXECUTE /etc/dynamic/scripts/rawdevice.script del /dev/$ "); } +sub fix_broken_alternatives() { + #- fix bad update-alternatives that may occurs after upgrade (and sometimes for install too). + -d "$::prefix/etc/alternatives" or return; + + foreach (all("$::prefix/etc/alternatives")) { + next if run_program::rooted($::prefix, 'test', '-e', "/etc/alternatives/$_"); + log::l("fixing broken alternative $_"); + run_program::rooted($::prefix, 'update-alternatives', '--auto', $_); + } +} + sub fileshare_config { my ($in, $type) = @_; #- $type is 'nfs', 'smb' or '' |