diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 029c674b..9557ebdb 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -372,12 +372,9 @@ def mount_network_share(server, read_write=False): username = server['User'] password = server['Pass'] if psutil.WINDOWS: - cmd = r'net use \\{ip}\{share} /user:{username} {password}'.format( - ip = server['IP'], - share = server['Share'], - username = username, - password = password) - cmd = cmd.split(' ') + cmd = [ + 'net', 'use', r'\\{IP}\{Share}'.format(**server), + '/user:{}'.format(username), password] warning = r'Failed to mount \\{Name}\{Share}, {IP} unreachable.'.format( **server) error = r'Failed to mount \\{Name}\{Share} ({IP})'.format(**server) diff --git a/.bin/Scripts/mount-backup-shares b/.bin/Scripts/mount-backup-shares index 9706a0a5..9f3612b6 100755 --- a/.bin/Scripts/mount-backup-shares +++ b/.bin/Scripts/mount-backup-shares @@ -22,7 +22,7 @@ if __name__ == '__main__': # Mount if is_connected(): - mount_backup_shares() + mount_backup_shares(read_write=True) else: # Couldn't connect print_error('ERROR: No network connectivity.') diff --git a/.bin/Scripts/remount-rw b/.bin/Scripts/remount-rw index 4a0b833e..1ba4b41d 100755 --- a/.bin/Scripts/remount-rw +++ b/.bin/Scripts/remount-rw @@ -18,6 +18,4 @@ if udevil mount $DEVICE; then else echo "Failed" fi - -sleep 2s exit 0