summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-29 07:50:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-29 07:50:42 +0000
commit76ed625f39c906ccb82f2e509c717ee573996af5 (patch)
tree3e632bda155551c1b538b6125fe43902c4965f10 /move
parent3edea49af2467369799e2d41118efec061a05d97 (diff)
downloaddrakx-76ed625f39c906ccb82f2e509c717ee573996af5.tar
drakx-76ed625f39c906ccb82f2e509c717ee573996af5.tar.gz
drakx-76ed625f39c906ccb82f2e509c717ee573996af5.tar.bz2
drakx-76ed625f39c906ccb82f2e509c717ee573996af5.tar.xz
drakx-76ed625f39c906ccb82f2e509c717ee573996af5.zip
- cleanup handle_etcfiles()
- /etc/security/fileshare.conf is on key to allow fileshare - remove unused files
Diffstat (limited to 'move')
-rw-r--r--move/data/keyfiles4
-rw-r--r--move/move.pm20
2 files changed, 13 insertions, 11 deletions
diff --git a/move/data/keyfiles b/move/data/keyfiles
index 7d07f9654..d414c83ba 100644
--- a/move/data/keyfiles
+++ b/move/data/keyfiles
@@ -11,6 +11,7 @@
/etc/devfs/conf.d/*
/etc/profile.d/*
/etc/sane.d/*
+/etc/security/fileshare.conf
/etc/shorewall/*
/etc/sysconfig/*
/etc/sysconfig/console/consolefonts/*
@@ -18,9 +19,6 @@
/etc/sysconfig/harddrake2/previous_hw
/etc/sysconfig/network-scripts/*
/etc/sysconfig/suspend-scripts/suspend.d/*
-/etc/X11/XF86Config
/etc/X11/XF86Config-4
-/etc/X11/XF86Config-4.old
-/etc/X11/XF86Config.old
/etc/X11/X
/etc/rc.d/rc.local
diff --git a/move/move.pm b/move/move.pm
index 1918d61bd..096e9f2d6 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -50,16 +50,20 @@ sub symlinkf_short {
sub handle_etcfiles {
my (@allowed_modes) = @_;
#- non-trivial files listed from tools/scan-etc.pl
+ my ($mode, $allowed);
foreach (chomp_(cat_('/image/move/etcfiles'))) {
- my $mode if 0;
- m|^# (\S+)| and $mode = $1;
- m|^/| && member($mode, @allowed_modes) and do {
- $mode eq 'READ' && !-e $_ and symlinkf_short("/image$_", $_);
- if ($mode eq 'OVERWRITE') {
+ if (m|^# (\S+)|) {
+ $mode = $1;
+ $allowed = member($mode, @allowed_modes);
+ } elsif (m|^/| && $allowed) {
+ if ($mode eq 'READ') {
+ symlinkf_short("/image$_", $_) if !-e $_;
+ } elsif ($mode eq 'OVERWRITE') {
mkdir_p(dirname($_));
cp_f("/image$_", $_); #- need copy contents
- }
- $mode eq 'DIR' and mkdir_p $_;
+ } elsif ($mode eq 'DIR') {
+ mkdir_p $_;
+ }
}
}
@@ -141,7 +145,7 @@ sub init {
#- ro things
symlinkf_short("/image/etc/$_", "/etc/$_")
- foreach qw(alternatives man.config services shells pam.d security inputrc ld.so.conf
+ foreach qw(alternatives man.config services shells pam.d inputrc ld.so.conf
DIR_COLORS bashrc profile init.d devfsd.conf gtk-2.0 pango fonts modules.devfs
dynamic hotplug gnome-vfs-2.0 gnome-vfs-mime-magic gtk gconf menu menu-methods nsswitch.conf default login.defs
skel ld.so.cache openoffice xinetd.d xinetd.conf syslog.conf sysctl.conf sysconfig/networking/ifcfg-lo