diff options
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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} || []}; |