summaryrefslogtreecommitdiffstats
path: root/draklive-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-19 22:41:40 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-19 22:41:40 +0000
commit4a2ab263c018b7d6dee71b34e56eaf27d5de8d48 (patch)
treeed89ac7c334d35694c26789110f2d10c533d1413 /draklive-install
parentcacc5e8bf368bd1e53b1ff97d92db9cc8e22a9f4 (diff)
downloaddraklive-install-4a2ab263c018b7d6dee71b34e56eaf27d5de8d48.tar
draklive-install-4a2ab263c018b7d6dee71b34e56eaf27d5de8d48.tar.gz
draklive-install-4a2ab263c018b7d6dee71b34e56eaf27d5de8d48.tar.bz2
draklive-install-4a2ab263c018b7d6dee71b34e56eaf27d5de8d48.tar.xz
draklive-install-4a2ab263c018b7d6dee71b34e56eaf27d5de8d48.zip
do not crash if harddrake2/previous_hw does not exist
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;