def enableMoreOptions( self ): if self.more_options: os.system( 'sync;sync;sync; umount /dev/mmcblk1p* /dev/sda* /dev/mapper/* &> /dev/null' ) poweroff_now() os.system( 'sleep 5' ) # os.system( 'shutdown -h now' ) sys.exit( 0 ) return # self.btnMoreoptions.setEnabled( False ) # self.btnMoreoptions.setVisible( False ) # self.btnContinue.setEnabled( False ) # self.btnContinue.setVisible( False ) # self.btnBigcontinue.setVisible( True ) # self.btnBigcontinue.raise_() # self.btnBigcontinue.raise_() # self.btnBigcontinue.raise_() # # self.btnContinue.set self.more_options = True self.btnMoreoptions.setText( 'Abort' ) self.chkAllowrootpassword.setChecked( True ) self.clickedAllowrootpassword( True ) self.adjustSize()
def enableMoreOptions(self): if self.more_options: os.system( 'sync;sync;sync; umount /dev/mmcblk1p* /dev/sda* /dev/mapper/* &> /dev/null' ) poweroff_now() os.system('sleep 5') # os.system( 'shutdown -h now' ) sys.exit(0) return # self.btnMoreoptions.setEnabled( False ) # self.btnMoreoptions.setVisible( False ) # self.btnContinue.setEnabled( False ) # self.btnContinue.setVisible( False ) # self.btnBigcontinue.setVisible( True ) # self.btnBigcontinue.raise_() # self.btnBigcontinue.raise_() # self.btnBigcontinue.raise_() # # self.btnContinue.set self.more_options = True self.btnMoreoptions.setText('Abort') self.chkAllowrootpassword.setChecked(True) self.clickedAllowrootpassword(True) self.adjustSize()
distro.crypto_filesystem_formatting_options, distro.spare_dev), status_lst=distro.status_lst, title_str=distro.title_str) # system_or_die( 'yes Y | mkfs -t ext4 %s' % ( distro.spare_dev ), status_lst = distro.status_lst, title_str = distro.title_str ) # mount it # system_or_die( 'mkdir -p /tmp/.p2' ) # system_or_die( 'mount %s /tmp/.p2' % ( distro.spare_dev ) ) # distro.remove_all_junk() distro.update_status_with_newline( 'Building a squashfs and installing kernel') res = distro.squash_OS( prefixpath='/tmp/.p2' ) # Compress filesystem => sqfs. Also rebuild+install MBR, initramfs, etc. if res != 0: distro.update_status_with_newline('I failed abysmally.') print("FAILED ABYSMALLY.\n") print("Type 'exit' to reboot\n") os.system('bash') else: distro.update_status_with_newline('Done. Success!') os.system('clear') print("Success! Exiting w/ retval=%d\n" % (res)) os.system( 'echo "Press <Enter> to reboot. Then, switch computer on and press <Ctrl>U to log in."; read line' ) os.system('sync;sync;sync; umount /dev/* &> /dev/null; umount /dev/null* ') os.system('echo 1 > /proc/sys/kernel/sysrq; echo b > /proc/sysrq-trigger') os.system('sleep 5') poweroff_now() sys.exit(res)
distro.mountpoint = '/' # Rebuild etc. shouldn't be necessary. Stage 1 took care of all that jazz. # Rebuild kernel, mk*fs, cryptsetup w/ KTHX and PHEZ enabled... but re-use the original kthx special code, please! # Build; install them (on myself) # mkfs.xfs (?) /dev/mmcblk1p2 distro.update_status_with_newline( '*** STAGE 2 INSTALLING! ***' ) # distro.update_status_with_newline( 'kernel dev = %s; spare dev = %s; root dev = %s' % ( distro.kernel_dev, distro.spare_dev, distro.root_dev ) ) system_or_die( '%s %s %s' % ( distro.crypto_filesystem_mkfs_binary, distro.crypto_filesystem_formatting_options, distro.spare_dev ), status_lst = distro.status_lst, title_str = distro.title_str ) # system_or_die( 'yes Y | mkfs -t ext4 %s' % ( distro.spare_dev ), status_lst = distro.status_lst, title_str = distro.title_str ) # mount it # system_or_die( 'mkdir -p /tmp/.p2' ) # system_or_die( 'mount %s /tmp/.p2' % ( distro.spare_dev ) ) # distro.remove_all_junk() distro.update_status_with_newline( 'Building a squashfs and installing kernel' ) res = distro.squash_OS( prefixpath = '/tmp/.p2' ) # Compress filesystem => sqfs. Also rebuild+install MBR, initramfs, etc. if res != 0: distro.update_status_with_newline( 'I failed abysmally.' ) print( "FAILED ABYSMALLY.\n" ) print( "Type 'exit' to reboot\n" ) os.system( 'bash' ) else: distro.update_status_with_newline( 'Done. Success!' ) os.system( 'clear' ) print( "Success! Exiting w/ retval=%d\n" % ( res ) ) os.system( 'echo "Press <Enter> to reboot. Then, switch computer on and press <Ctrl>U to log in."; read line' ) os.system( 'sync;sync;sync; umount /dev/* &> /dev/null; umount /dev/null* ' ) os.system( 'echo 1 > /proc/sys/kernel/sysrq; echo b > /proc/sysrq-trigger' ) os.system( 'sleep 5' ) poweroff_now() sys.exit( res )