summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
Diffstat (limited to 'draklive')
-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} || []};