diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-20 10:59:00 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-20 10:59:00 +0000 |
commit | 545da12f95f719e7ff675d113da196f634cb9888 (patch) | |
tree | 827b8b4bc455f5c4ce68eb7c41499fd1dcf0fb82 | |
parent | f84b7c9b7afb7cf81a0399ecaa6088c51f4ae581 (diff) | |
download | drakx-backup-do-not-use-545da12f95f719e7ff675d113da196f634cb9888.tar drakx-backup-do-not-use-545da12f95f719e7ff675d113da196f634cb9888.tar.gz drakx-backup-do-not-use-545da12f95f719e7ff675d113da196f634cb9888.tar.bz2 drakx-backup-do-not-use-545da12f95f719e7ff675d113da196f634cb9888.tar.xz drakx-backup-do-not-use-545da12f95f719e7ff675d113da196f634cb9888.zip |
speedup boot by launching etc-monitorer only one time from within drakx
-rwxr-xr-x | move/etc-monitorer.pl | 18 | ||||
-rw-r--r-- | move/move.pm | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/move/etc-monitorer.pl b/move/etc-monitorer.pl index eb09c1e8f..0593554ac 100755 --- a/move/etc-monitorer.pl +++ b/move/etc-monitorer.pl @@ -8,13 +8,15 @@ sub logit { outpend "/var/log/etc-monitorer.log", sprintf("[%s] @_\n", chomp_(`d my $machine_ident = cat_('/var/lib/machine_ident'); my $sysconf = "/home/.sysconf/$machine_ident"; -foreach (glob_("$ARGV[0]/*")) { - next if $_ eq '/etc/sudoers'; #- /etc/sudoers can't be a link - if (-f && !-l) { - my $dest = "/home/.sysconf/$machine_ident$_"; - mkdir_p(dirname($dest)); #- case of newly created directories - logit("restoring broken symlink $_ -> $dest"); - system("mv $_ $dest"); - symlink($dest, $_); +foreach my $dir (@ARGV) { + foreach (glob_("$dir/*")) { + next if $_ eq '/etc/sudoers'; #- /etc/sudoers can't be a link + if (-f && !-l) { + my $dest = "/home/.sysconf/$machine_ident$_"; + mkdir_p(dirname($dest)); #- case of newly created directories + logit("restoring broken symlink $_ -> $dest"); + system("mv $_ $dest"); + symlink($dest, $_); + } } } diff --git a/move/move.pm b/move/move.pm index 5570e545c..23c140601 100644 --- a/move/move.pm +++ b/move/move.pm @@ -422,7 +422,7 @@ sub install2::startMove { if (cat_('/proc/mounts') =~ m|\s/home\s|) { output '/var/lib/machine_ident', machine_ident(); - run_program::run('/usr/bin/etc-monitorer.pl', $_) foreach uniq map { dirname($_) } chomp_(`find /etc -type f`); + run_program::run('/usr/bin/etc-monitorer.pl', uniq map { dirname($_) } chomp_(`find /etc -type f`)); run_program::raw({ detach => 1 }, '/usr/bin/dnotify', '-MCR', '/etc', '-r', '-e', '/usr/bin/etc-monitorer.pl', '{}') or die "dnotify not found!"; } |