aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2016-09-25 20:13:57 +0200
committerPapoteur <papoteur@mageialinux-online.org>2016-09-25 20:13:57 +0200
commit9df186ede3d675030a02b41dcd363f8767e5c004 (patch)
tree4b741c096a108058f95ca2a6999024e61526b6ce
parentd8edd51c15f43050d3038d19277297d1e6a58e78 (diff)
downloadmsec-9df186ede3d675030a02b41dcd363f8767e5c004.tar
msec-9df186ede3d675030a02b41dcd363f8767e5c004.tar.gz
msec-9df186ede3d675030a02b41dcd363f8767e5c004.tar.bz2
msec-9df186ede3d675030a02b41dcd363f8767e5c004.tar.xz
msec-9df186ede3d675030a02b41dcd363f8767e5c004.zip
Clean unused code in msec.py
- password_loader() - nopassword_loader()
-rwxr-xr-xsrc/msec/plugins/msec.py22
1 files changed, 0 insertions, 22 deletions
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.'''