Musharraf to quit military if re-elected