diff options
Diffstat (limited to 'scripts')
50 files changed, 1 insertions, 6474 deletions
diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py b/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py index da48ff50d5..2d94550935 100644 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py +++ b/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py @@ -17,10 +17,4 @@ # subject to the GNU General Public License and may only be used or replicated # with the express permission of Red Hat, Inc. # -import authconfig, autopart, autostep, bootloader, clearpart, device -import deviceprobe, displaymode, dmraid, driverdisk, fcoe, firewall, firstboot -import group, ignoredisk, interactive, iscsi, iscsiname, key, keyboard, lang -import langsupport, lilocheck, logging, logvol, mediacheck, method, monitor -import mouse, multipath, network, partition, raid, reboot, repo, rescue, rootpw -import selinux, services, skipx, sshpw, timezone, updates, upgrade, user, vnc -import volgroup, xconfig, zerombr, zfcp +import bootloader, partition diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py b/scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py deleted file mode 100644 index 9af9c0ff14..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/authconfig.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * - -class FC3_Authconfig(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=0, *args, **kwargs): - KickstartCommand.__init__(self, *args, **kwargs) - self.authconfig = kwargs.get("authconfig", "") - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.authconfig: - retval += "# System authorization information\nauth %s\n" % self.authconfig - - return retval - - def parse(self, args): - self.authconfig = self.currentLine[len(self.currentCmd):].strip() - return self diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py b/scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py deleted file mode 100644 index cf28b5c7f7..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/autopart.py +++ /dev/null @@ -1,119 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * -from pykickstart.errors import * -from pykickstart.options import * - -import gettext -_ = lambda x: gettext.ldgettext("pykickstart", x) - -class FC3_AutoPart(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=100, *args, **kwargs): - KickstartCommand.__init__(self, writePriority, *args, **kwargs) - self.autopart = kwargs.get("autopart", False) - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.autopart: - retval += "autopart\n" - - return retval - - def parse(self, args): - if len(args) > 0: - raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Kickstart command %s does not take any arguments") % "autopart") - - self.autopart = True - return self - -class F9_AutoPart(FC3_AutoPart): - removedKeywords = FC3_AutoPart.removedKeywords - removedAttrs = FC3_AutoPart.removedAttrs - - def __init__(self, writePriority=100, *args, **kwargs): - FC3_AutoPart.__init__(self, writePriority=writePriority, *args, **kwargs) - self.encrypted = kwargs.get("encrypted", False) - self.passphrase = kwargs.get("passphrase", "") - - self.op = self._getParser() - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.autopart: - retval += "autopart" - - if self.encrypted: - retval += " --encrypted" - - if self.passphrase != "": - retval += " --passphrase=\"%s\""% self.passphrase - - if retval != "": - retval += "\n" - - return retval - - def _getParser(self): - op = KSOptionParser() - op.add_option("--encrypted", action="store_true", default=False) - op.add_option("--passphrase") - return op - - def parse(self, args): - (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) - self._setToSelf(self.op, opts) - self.autopart = True - return self - -class F12_AutoPart(F9_AutoPart): - removedKeywords = F9_AutoPart.removedKeywords - removedAttrs = F9_AutoPart.removedAttrs - - def __init__(self, writePriority=100, *args, **kwargs): - F9_AutoPart.__init__(self, writePriority=writePriority, *args, **kwargs) - - self.escrowcert = kwargs.get("escrowcert", "") - self.backuppassphrase = kwargs.get("backuppassphrase", False) - - def __str__(self): - retval = F9_AutoPart.__str__(self) - - if self.encrypted and self.escrowcert != "": - retval = retval.strip() - - retval += " --escrowcert=\"%s\"" % self.escrowcert - - if self.backuppassphrase: - retval += " --backuppassphrase" - - retval += "\n" - - return retval - - def _getParser(self): - op = F9_AutoPart._getParser(self) - op.add_option("--escrowcert") - op.add_option("--backuppassphrase", action="store_true", default=False) - return op diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py b/scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py deleted file mode 100644 index e6ae71cefc..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/autostep.py +++ /dev/null @@ -1,55 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * -from pykickstart.options import * - -class FC3_AutoStep(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=0, *args, **kwargs): - KickstartCommand.__init__(self, writePriority, *args, **kwargs) - self.op = self._getParser() - - self.autostep = kwargs.get("autostep", False) - self.autoscreenshot = kwargs.get("autoscreenshot", False) - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.autostep: - if self.autoscreenshot: - retval += "autostep --autoscreenshot\n" - else: - retval += "autostep\n" - - return retval - - def _getParser(self): - op = KSOptionParser() - op.add_option("--autoscreenshot", dest="autoscreenshot", - action="store_true", default=False) - return op - - def parse(self, args): - (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) - self._setToSelf(self.op, opts) - self.autostep = True - return self diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py b/scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py deleted file mode 100644 index a8089fcb99..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/clearpart.py +++ /dev/null @@ -1,86 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * -from pykickstart.constants import * -from pykickstart.errors import * -from pykickstart.options import * - -class FC3_ClearPart(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=120, *args, **kwargs): - KickstartCommand.__init__(self, writePriority, *args, **kwargs) - self.op = self._getParser() - - self.drives = kwargs.get("drives", []) - self.initAll = kwargs.get("initAll", False) - self.type = kwargs.get("type", None) - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.type is None: - return retval - - if self.type == CLEARPART_TYPE_NONE: - clearstr = "--none" - elif self.type == CLEARPART_TYPE_LINUX: - clearstr = "--linux" - elif self.type == CLEARPART_TYPE_ALL: - clearstr = "--all" - else: - clearstr = "" - - if self.initAll: - initstr = "--initlabel" - else: - initstr = "" - - if len(self.drives) > 0: - drivestr = "--drives=" + ",".join(self.drives) - else: - drivestr = "" - - retval += "# Partition clearing information\nclearpart %s %s %s\n" % (clearstr, initstr, drivestr) - return retval - - def _getParser(self): - def drive_cb (option, opt_str, value, parser): - for d in value.split(','): - parser.values.ensure_value(option.dest, []).append(d) - - op = KSOptionParser() - op.add_option("--all", dest="type", action="store_const", - const=CLEARPART_TYPE_ALL) - op.add_option("--drives", dest="drives", action="callback", - callback=drive_cb, nargs=1, type="string") - op.add_option("--initlabel", dest="initAll", action="store_true", - default=False) - op.add_option("--linux", dest="type", action="store_const", - const=CLEARPART_TYPE_LINUX) - op.add_option("--none", dest="type", action="store_const", - const=CLEARPART_TYPE_NONE) - return op - - def parse(self, args): - (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) - self._setToSelf(self.op, opts) - return self diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/device.py b/scripts/lib/mic/3rdparty/pykickstart/commands/device.py deleted file mode 100644 index 321410e2e2..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/device.py +++ /dev/null @@ -1,125 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * -from pykickstart.options import * - -import gettext -import warnings -_ = lambda x: gettext.ldgettext("pykickstart", x) - -class F8_DeviceData(BaseData): - removedKeywords = BaseData.removedKeywords - removedAttrs = BaseData.removedAttrs - - def __init__(self, *args, **kwargs): - BaseData.__init__(self, *args, **kwargs) - self.moduleName = kwargs.get("moduleName", "") - self.moduleOpts = kwargs.get("moduleOpts", "") - - def __eq__(self, y): - return self.moduleName == y.moduleName - - def __str__(self): - retval = BaseData.__str__(self) - - if self.moduleName != "": - retval += "device %s" % self.moduleName - - if self.moduleOpts != "": - retval += " --opts=\"%s\"" % self.moduleOpts - - return retval + "\n" - -class FC3_Device(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=0, *args, **kwargs): - KickstartCommand.__init__(self, writePriority, *args, **kwargs) - self.op = self._getParser() - - self.type = kwargs.get("type", "") - self.moduleName = kwargs.get("moduleName", "") - self.moduleOpts = kwargs.get("moduleOpts", "") - - def __eq__(self, y): - return self.moduleName == y.moduleName - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.moduleName != "": - retval += "device %s %s" % (self.type, self.moduleName) - - if self.moduleOpts != "": - retval += " --opts=\"%s\"" % self.moduleOpts - - return retval + "\n" - - def _getParser(self): - op = KSOptionParser() - op.add_option("--opts", dest="moduleOpts", default="") - return op - - def parse(self, args): - (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) - - if len(extra) != 2: - raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("device command requires two arguments: module type and name")) - - self.moduleOpts = opts.moduleOpts - self.type = extra[0] - self.moduleName = extra[1] - return self - -class F8_Device(FC3_Device): - removedKeywords = FC3_Device.removedKeywords - removedAttrs = FC3_Device.removedAttrs - - def __init__(self, writePriority=0, *args, **kwargs): - FC3_Device.__init__(self, writePriority, *args, **kwargs) - self.deviceList = kwargs.get("deviceList", []) - - def __str__(self): - retval = "" - for device in self.deviceList: - retval += device.__str__() - - return retval - - def parse(self, args): - (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) - - if len(extra) != 1: - raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("%s command requires a single argument: %s") % ("device", "module name")) - - dd = F8_DeviceData() - self._setToObj(self.op, opts, dd) - dd.lineno = self.lineno - dd.moduleName = extra[0] - - # Check for duplicates in the data list. - if dd in self.dataList(): - warnings.warn(_("A module with the name %s has already been defined.") % dd.moduleName) - - return dd - - def dataList(self): - return self.deviceList diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py b/scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py deleted file mode 100644 index 9f462fdff7..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/deviceprobe.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * - -class FC3_DeviceProbe(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=0, *args, **kwargs): - KickstartCommand.__init__(self, writePriority, *args, **kwargs) - self.deviceprobe = kwargs.get("deviceprobe", "") - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.deviceprobe != "": - retval += "deviceprobe %s\n" % self.deviceprobe - - return retval - - def parse(self, args): - self.deviceprobe = " ".join(args) - return self diff --git a/scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py b/scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py deleted file mode 100644 index 6a12d58ec2..0000000000 --- a/scripts/lib/mic/3rdparty/pykickstart/commands/displaymode.py +++ /dev/null @@ -1,68 +0,0 @@ -# -# Chris Lumens <clumens@redhat.com> -# -# Copyright 2005, 2006, 2007 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing to use, modify, -# copy, or redistribute it subject to the terms and conditions of the GNU -# General Public License v.2. This program is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the -# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat -# trademarks that are incorporated in the source code or documentation are not -# subject to the GNU General Public License and may only be used or replicated -# with the express permission of Red Hat, Inc. -# -from pykickstart.base import * -from pykickstart.constants import * -from pykickstart.options import * - -import gettext -_ = lambda x: gettext.ldgettext("pykickstart", x) - -class FC3_DisplayMode(KickstartCommand): - removedKeywords = KickstartCommand.removedKeywords - removedAttrs = KickstartCommand.removedAttrs - - def __init__(self, writePriority=0, *args, **kwargs): - KickstartCommand.__init__(self, writePriority, *args, **kwargs) - self.op = self._getParser() - self.displayMode = kwargs.get("displayMode", None) - - def __str__(self): - retval = KickstartCommand.__str__(self) - - if self.displayMode is None: - return retval - - if self.displayMode == DISPLAY_MODE_CMDLINE: - retval += "cmdline\n" - elif self.displayMode == DISPLAY_MODE_GRAPHICAL: - retval += "# Use graphical install\ngraphical\n" - elif self.displayMode == DISPLAY_MODE_TEXT: - retval += "# Use text mode install\ntext\n" |
