summaryrefslogtreecommitdiffstats
path: root/globetrotter
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-06-26 23:48:03 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-06-26 23:48:03 +0000
commit1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8 (patch)
treea6215797bf3d91a11c2738e729790e6866f64724 /globetrotter
parentec35f4fa54956945e4f519ff00e2b3116ca870d1 (diff)
downloaddrakx-backup-do-not-use-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar
drakx-backup-do-not-use-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar.gz
drakx-backup-do-not-use-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar.bz2
drakx-backup-do-not-use-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.tar.xz
drakx-backup-do-not-use-1ac2968e23fc5b64a46e7c9651c06c4fcdcc0ea8.zip
recreate existing user accounts on restoring
Diffstat (limited to 'globetrotter')
-rwxr-xr-xglobetrotter/make_live11
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);