summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-11-30 17:14:55 +0000
committerOlivier Blin <oblin@mandriva.com>2009-11-30 17:14:55 +0000
commit911783c2b61b1abe455456c2fd0d2d0d8384ca1a (patch)
tree1e22ef6269a9382cf53bde4a7ee480ae1eb961f0
parentecd17317ad56aa578c8ac59edf0f40f99d2af956 (diff)
downloaddrakiso-911783c2b61b1abe455456c2fd0d2d0d8384ca1a.tar
drakiso-911783c2b61b1abe455456c2fd0d2d0d8384ca1a.tar.gz
drakiso-911783c2b61b1abe455456c2fd0d2d0d8384ca1a.tar.bz2
drakiso-911783c2b61b1abe455456c2fd0d2d0d8384ca1a.tar.xz
drakiso-911783c2b61b1abe455456c2fd0d2d0d8384ca1a.zip
extract clean_system_conf_file
-rwxr-xr-xdraklive7
1 files changed, 6 insertions, 1 deletions
diff --git a/draklive b/draklive
index 32e1544..335e7ba 100755
--- a/draklive
+++ b/draklive
@@ -227,6 +227,11 @@ sub remove_files_from {
if $files && @$files;
}
+sub clean_system_conf_file {
+ my ($file) = @_;
+ substInFile { undef $_ if /^[^#]/ } $live->get_system_root . $file;
+}
+
sub post_install_system {
my ($live) = @_;
@@ -277,7 +282,7 @@ sub post_install_system {
'perl', '-MStorable', '-e', qq(Storable::store({ UNKNOWN => {} }, '/etc/sysconfig/harddrake2/previous_hw')));
#- remove some build-machine specific configuration
- substInFile { undef $_ if /^[^#]/ } $live->get_system_root . $_
+ clean_system_conf_file($_)
foreach qw(/etc/mtab /etc/modprobe.conf /etc/modprobe.preload /etc/iftab /etc/shorewall/interfaces /etc/mdadm.conf /etc/resolv.conf),
if_(!$live->{system}{skip_fstab}, '/etc/fstab');
unlink($_) foreach map { glob($live->get_system_root . $_) } @{$live->{system}{remove_files} || []};