diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-18 14:45:08 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-18 14:45:08 +0000 |
commit | d6c7a21b97fb99c73fd7e2a831371f053e474be6 (patch) | |
tree | 7e58840a66586310ac9b8161f84cefa068d46e7e /move/move.pm | |
parent | 861099c1f2fab024ac279280968082b953f77cc6 (diff) | |
download | drakx-d6c7a21b97fb99c73fd7e2a831371f053e474be6.tar drakx-d6c7a21b97fb99c73fd7e2a831371f053e474be6.tar.gz drakx-d6c7a21b97fb99c73fd7e2a831371f053e474be6.tar.bz2 drakx-d6c7a21b97fb99c73fd7e2a831371f053e474be6.tar.xz drakx-d6c7a21b97fb99c73fd7e2a831371f053e474be6.zip |
have system configuration files automagically saved on the usb key with dnotify and a script
Diffstat (limited to 'move/move.pm')
-rw-r--r-- | move/move.pm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/move/move.pm b/move/move.pm index 373bf407f..d3baafbf9 100644 --- a/move/move.pm +++ b/move/move.pm @@ -198,9 +198,15 @@ sub key_installfiles { eval { rm_rf $sysconf }; mkdir $sysconf; foreach (chomp_(cat_('/image/move/keyfiles'))) { - mkdir_p("$sysconf/" . dirname($_)); - system("cp $_ $sysconf$_"); - symlinkf("$sysconf$_", $_); + my $target_dir = "$sysconf/" . dirname($_); + mkdir_p($target_dir); + if (/\*$/) { + system("cp $_ $target_dir"); + symlinkf("$sysconf$_", $_) foreach glob($_); + } else { + system("cp $_ $sysconf$_"); + symlinkf("$sysconf$_", $_); + } } system("cp /image/move/README.adding.more.files /home/.sysconf"); } else { @@ -372,6 +378,9 @@ sub install2::startMove { output("/var/run/console/$username", 1); run_program::run('pam_console_apply'); + run_program::raw({ detach => 1 }, '/usr/bin/dnotify', '-MCR', '/etc', '-r', '-e', '/usr/bin/etc-monitorer.pl', '{}') or die "dnotify not found!"; + output '/var/lib/machine_ident', machine_ident(); + if (fork()) { sleep 1; log::l("DrakX waves bye-bye"); |