diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-06-26 23:48:03 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-06-26 23:48:03 +0000 |
commit | 1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8 (patch) | |
tree | a6215797bf3d91a11c2738e729790e6866f64724 /globetrotter/make_live | |
parent | ec35f4fa54956945e4f519ff00e2b3116ca870d1 (diff) | |
download | drakx-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar drakx-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar.gz drakx-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar.bz2 drakx-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar.xz drakx-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.zip |
recreate existing user accounts on restoring
Diffstat (limited to 'globetrotter/make_live')
-rwxr-xr-x | globetrotter/make_live | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/globetrotter/make_live b/globetrotter/make_live index e3f8bc863..8555b8397 100755 --- a/globetrotter/make_live +++ b/globetrotter/make_live @@ -527,6 +527,17 @@ unlink $_ foreach glob("$::prefix/core.*"); system("rsync -rvltp /export/ $::prefix/mnt/packages/") if !$rescue; +if ($rescue) { + foreach (glob("$::prefix/home/*/")) { + next if /lost\+found/; + my (undef, undef, undef, undef, $uid) = stat($_); + my $name = $_; + $name =~ s!/$!!; + $name =~ s!.*/!!; + run_program::rooted($::prefix, "adduser", "-u", $uid, "$name"); + } +} + unlink $_ foreach glob("$::prefix/var/lib/urpmi/*"); run_program::rooted($::prefix, 'urpmi.addmedia', '--probe-hdlist', $_, "/mnt/packages/media/$_/") foreach qw(main contrib firmwares dkms modules plugins); |