diff options
Diffstat (limited to 'linhes/linhes-system/add_storage.py')
-rwxr-xr-x | linhes/linhes-system/add_storage.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/linhes/linhes-system/add_storage.py b/linhes/linhes-system/add_storage.py index 2d300a3..8821016 100755 --- a/linhes/linhes-system/add_storage.py +++ b/linhes/linhes-system/add_storage.py @@ -291,7 +291,7 @@ class disk_device: #determine options #new_options = self.find_options_type(fstab)[0] - new_options = "nofail,x-systemd.device-timeout=1" + new_options = "nofail,x-systemd.device-timeout=10" #find blkid self.block_partition="%s1" %self.block_path @@ -908,8 +908,11 @@ class reconstruct_path: def symlink_disk(self): print(" Creating symlink for disk%s" %self.disk_num) disk_ln="%s/disk%s" %(self.top_mount_dir,self.disk_num) - cmd = "ln -s %s %s" %(self.mount_point,disk_ln) - runcmd(cmd) + if os.path.islink(disk_ln): + print(" Symlink %s exists. Skipping." %disk_ln) + else: + cmd = "ln -s %s %s" %(self.mount_point,disk_ln) + runcmd(cmd) def add_fstab(self): #new_fstab_list=['UUID=', 'mount_point', 'auto', 'defaults', '0', '1'] @@ -932,7 +935,7 @@ class reconstruct_path: #construct new line #new_options = self.find_options_type(fstab)[0] - new_options = "nofail,x-systemd.device-timeout=1" + new_options = "nofail,x-systemd.device-timeout=10" new_fstab_list[0]="UUID=%s" %self.uuid new_fstab_list[1]=self.mount_point new_fstab_list[3]=new_options |