s4: fix SD update and password change in upgrade script