From fd8bbba2f02b8bccd69e67c326fd320c0827941d Mon Sep 17 00:00:00 2001 From: Mageia SVN-Git Migration Date: Sun, 6 Feb 2011 22:37:08 +0000 Subject: Synthesized commit during git-svn import combining previous Mandriva history with Mageia. This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r431 | dmorgan | 2011-02-06 01:58:02 +0000 (Sun, 06 Feb 2011) | 1 line Add drakx structure on the SVN ------------------------------------------------------------------------ r432 | dmorgan | 2011-02-06 01:59:38 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned advertising ------------------------------------------------------------------------ r446 | dmorgan | 2011-02-06 22:37:08 +0000 (Sun, 06 Feb 2011) | 1 line Import Clean perl-install ------------------------------------------------------------------------ r448 | dmorgan | 2011-02-06 23:02:36 +0000 (Sun, 06 Feb 2011) | 1 line Add cleaned files ------------------------------------------------------------------------ r449 | dmorgan | 2011-02-06 23:03:52 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned kernel ------------------------------------------------------------------------ r450 | dmorgan | 2011-02-06 23:23:30 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned tools ------------------------------------------------------------------------ r451 | dmorgan | 2011-02-07 00:01:56 +0000 (Mon, 07 Feb 2011) | 1 line Import stage1 ------------------------------------------------------------------------ r473 | dmorgan | 2011-02-07 11:20:50 +0000 (Mon, 07 Feb 2011) | 1 line Import images ------------------------------------------------------------------------ r497 | ennael | 2011-02-09 21:02:06 +0000 (Wed, 09 Feb 2011) | 2 lines readd missing file ------------------------------------------------------------------------ r502 | pterjan | 2011-02-09 23:30:32 +0000 (Wed, 09 Feb 2011) | 1 line Import rescue ------------------------------------------------------------------------ r603 | ennael | 2011-02-24 13:32:54 +0000 (Thu, 24 Feb 2011) | 2 lines import cleaned rescue for Mageia ------------------------------------------------------------------------ r2061 | tv | 2011-10-20 20:32:19 +0100 (Thu, 20 Oct 2011) | 1 line import (cleaned) doc ------------------------------------------------------------------------ --- rescue/Flash/scripts/upgrade.merge-users | 52 -------------------------------- 1 file changed, 52 deletions(-) delete mode 100755 rescue/Flash/scripts/upgrade.merge-users (limited to 'rescue/Flash/scripts/upgrade.merge-users') diff --git a/rescue/Flash/scripts/upgrade.merge-users b/rescue/Flash/scripts/upgrade.merge-users deleted file mode 100755 index 297960e91..000000000 --- a/rescue/Flash/scripts/upgrade.merge-users +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/perl - -use MDK::Common; - -@ARGV == 2 or die "merge_users \n"; - -my ($existing_dir, $new_dir) = @ARGV; - -merge('passwd', 'shadow'); -merge('group', 'gshadow'); - -sub merge { - my ($main, $shadow) = @_; - - my @new = cat_("$new_dir/$main"); - my %new_ids = map { (split ':')[2] => $_ } @new; - - my %names_to_have; - foreach (cat_("$existing_dir/$main")) { - my @l = split ':'; - next if $l[0] eq 'nobody' || $l[2] < 500; - if (my $e = $new_ids{$l[2]}) { - $_ eq $e or warn "ERROR: conflicting entries:\n $_ $e"; - } else { - push @new, $_; - $names_to_have{$l[0]} = 1; - } - } - - my @new_shadow = grep { !/^root:/ } cat_("$new_dir/$shadow"); - foreach (cat_("$existing_dir/$shadow")) { - my ($name) = split ':'; - if ($name eq 'root') { - unshift @new_shadow, $_; - } elsif ($names_to_have{$name}) { - push @new_shadow, $_; - } - } - - if (rename "$existing_dir/$main", "$existing_dir/$main.old") { - output("$existing_dir/$main", @new); - } else { - warn "rename $existing_dir/$main failed: $?\n"; - ; - } - if (rename "$existing_dir/$shadow", "$existing_dir/$shadow.old") { - output("$existing_dir/$shadow", @new_shadow); - } else { - warn "rename $existing_dir/$shadow failed: $?\n"; - ; - } -} -- cgit v1.2.1