diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-06-26 23:47:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-06-26 23:47:59 +0000 |
commit | b5c9aeeb3ea80de700dd637282f62fe5e0dd1e32 (patch) | |
tree | e4a6a79db4be19806c16121c29dc585be4f8e1df /globetrotter | |
parent | b5b516e1614b96774fa387972d14cc20243b5607 (diff) | |
download | drakx-backup-do-not-use-b5c9aeeb3ea80de700dd637282f62fe5e0dd1e32.tar drakx-backup-do-not-use-b5c9aeeb3ea80de700dd637282f62fe5e0dd1e32.tar.gz drakx-backup-do-not-use-b5c9aeeb3ea80de700dd637282f62fe5e0dd1e32.tar.bz2 drakx-backup-do-not-use-b5c9aeeb3ea80de700dd637282f62fe5e0dd1e32.tar.xz drakx-backup-do-not-use-b5c9aeeb3ea80de700dd637282f62fe5e0dd1e32.zip |
recreate existing user accounts on restoring
Diffstat (limited to 'globetrotter')
-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); |