summaryrefslogtreecommitdiffstats
path: root/draklive-install
diff options
context:
space:
mode:
Diffstat (limited to 'draklive-install')
-rwxr-xr-xdraklive-install8
1 files changed, 5 insertions, 3 deletions
diff --git a/draklive-install b/draklive-install
index 4736c4a..846f2f5 100755
--- a/draklive-install
+++ b/draklive-install
@@ -167,9 +167,11 @@ fs::write_fstab($all_hds, $::prefix);
#- are automatically rediscovered at first boot
require Storable;
my $harddrake_file = $::prefix . "/etc/sysconfig/harddrake2/previous_hw";
-my $harddrake_conf = Storable::retrieve($harddrake_file);
-delete $harddrake_conf->{HARDDISK};
-Storable::store($harddrake_conf, $harddrake_file);
+my $harddrake_conf = eval { Storable::retrieve($harddrake_file) };
+if ($harddrake_conf) {
+ delete $harddrake_conf->{HARDDISK};
+ Storable::store($harddrake_conf, $harddrake_file);
+}
# enable back some disabled services
require services;