From 9df186ede3d675030a02b41dcd363f8767e5c004 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 25 Sep 2016 20:13:57 +0200 Subject: Clean unused code in msec.py - password_loader() - nopassword_loader() --- src/msec/plugins/msec.py | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src') diff --git a/src/msec/plugins/msec.py b/src/msec/plugins/msec.py index 390a637..6bf5675 100755 --- a/src/msec/plugins/msec.py +++ b/src/msec/plugins/msec.py @@ -427,28 +427,6 @@ class msec: self.log.info(_('Forbidding autologin')) autologin.set_shell_variable('AUTOLOGIN', 'no') - def password_loader(self, value): - '''Unused''' - self.log.info(_('Activating password in boot loader')) - liloconf = self.configfiles.get_config_file(LILOCONF) - liloconf.exists() and (liloconf.replace_line_matching('^password=', 'password="' + value + '"', 0, 1) or \ - liloconf.insert_after('^boot=', 'password="' + value + '"')) and \ - Perms.chmod(liloconf.path, 0o600) - # TODO encrypt password in grub - menulst = self.configfiles.get_config_file(MENULST) - menulst.exists() and (menulst.replace_line_matching('^password\s', 'password "' + value + '"') or \ - menulst.insert_at(0, 'password "' + value + '"')) and \ - Perms.chmod(menulst.path, 0o600) - # TODO add yaboot support - - def nopassword_loader(self): - '''Unused''' - self.log.info(_('Removing password in boot loader')) - liloconf = self.configfiles.get_config_file(LILOCONF) - liloconf.exists() and liloconf.remove_line_matching('^password=', 1) - menulst = self.configfiles.get_config_file(MENULST) - menulst.exists() and menulst.remove_line_matching('^password\s') - def enable_console_log(self, arg, expr='*.*', dev='tty12'): ''' Log syslog messages on console terminal 12.''' -- cgit v1.2.1