summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-08-15 14:33:59 +0200
committerNeil Williams <codehelp@debian.org>2015-08-16 14:28:35 +0200
commit54b1ab7ea71a857791189d7a2108c8b76cbfde2a (patch)
tree1515a90e7e8a8986277adc2654f001e8ecdbcce0
parentca8829488c49ae4801ef91eed6d17f7bad892eef (diff)
downloadvmdebootstrap-54b1ab7ea71a857791189d7a2108c8b76cbfde2a.tar.gz
move handlers into a module directory
-rwxr-xr-xbin/vmdebootstrap (renamed from vmdebootstrap)12
-rw-r--r--vmdebootstrap/__init__.py0
-rw-r--r--vmdebootstrap/base.py (renamed from base.py)0
-rw-r--r--vmdebootstrap/codenames.py (renamed from codenames.py)2
-rw-r--r--vmdebootstrap/extlinux.py (renamed from extlinux.py)10
-rw-r--r--vmdebootstrap/filesystem.py (renamed from filesystem.py)6
-rw-r--r--vmdebootstrap/grub.py (renamed from grub.py)4
-rw-r--r--vmdebootstrap/uefi.py (renamed from uefi.py)2
8 files changed, 18 insertions, 18 deletions
diff --git a/vmdebootstrap b/bin/vmdebootstrap
index 0b169bb..1bb9e2e 100755
--- a/vmdebootstrap
+++ b/bin/vmdebootstrap
@@ -25,16 +25,16 @@ import logging
import datetime
import tempfile
import subprocess
-from base import (
+from vmdebootstrap.base import (
Base,
runcmd,
cleanup_apt_cache,
)
-from grub import GrubHandler
-from extlinux import ExtLinux
-from codenames import Codenames
-from filesystem import Filesystem
-from uefi import Uefi, arch_table
+from vmdebootstrap.grub import GrubHandler
+from vmdebootstrap.extlinux import ExtLinux
+from vmdebootstrap.codenames import Codenames
+from vmdebootstrap.filesystem import Filesystem
+from vmdebootstrap.uefi import Uefi, arch_table
__version__ = '1.0'
diff --git a/vmdebootstrap/__init__.py b/vmdebootstrap/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vmdebootstrap/__init__.py
diff --git a/base.py b/vmdebootstrap/base.py
index c2799e7..c2799e7 100644
--- a/base.py
+++ b/vmdebootstrap/base.py
diff --git a/codenames.py b/vmdebootstrap/codenames.py
index 335c474..045d5b2 100644
--- a/codenames.py
+++ b/vmdebootstrap/codenames.py
@@ -21,7 +21,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
-from base import Base
+from vmdebootstrap.base import Base
from distro_info import DebianDistroInfo, UbuntuDistroInfo
# pylint: disable=missing-docstring
diff --git a/extlinux.py b/vmdebootstrap/extlinux.py
index 9e88fd5..7286282 100644
--- a/extlinux.py
+++ b/vmdebootstrap/extlinux.py
@@ -23,7 +23,7 @@ import os
import time
import cliapp
import logging
-from base import Base
+from vmdebootstrap.base import Base, runcmd
class ExtLinux(Base):
@@ -54,8 +54,8 @@ class ExtLinux(Base):
logging.debug("No kernel found. %s. Skipping install of extlinux.", exc)
return
- out = self.runcmd(['blkid', '-c', '/dev/null', '-o', 'value',
- '-s', 'UUID', rootdev])
+ out = runcmd(['blkid', '-c', '/dev/null', '-o', 'value',
+ '-s', 'UUID', rootdev])
uuid = out.splitlines()[0].strip()
conf = os.path.join(rootdir, 'extlinux.conf')
@@ -85,6 +85,6 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s
ext_f = open(conf, 'w')
ext_f.write(msg)
- self.runcmd(['extlinux', '--install', rootdir])
- self.runcmd(['sync'])
+ runcmd(['extlinux', '--install', rootdir])
+ runcmd(['sync'])
time.sleep(2)
diff --git a/filesystem.py b/vmdebootstrap/filesystem.py
index 1b40519..e0a16d9 100644
--- a/filesystem.py
+++ b/vmdebootstrap/filesystem.py
@@ -4,9 +4,9 @@
# -*- coding: utf-8 -*-
#
# filesystem.py
-#
+#
# Copyright 2015 Neil Williams <codehelp@debian.org>
-#
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -20,7 +20,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from base import Base
+from vmdebootstrap.base import Base
class Filesystem(Base):
diff --git a/grub.py b/vmdebootstrap/grub.py
index 0c55ae8..8d55ce1 100644
--- a/grub.py
+++ b/vmdebootstrap/grub.py
@@ -23,13 +23,13 @@
import os
import cliapp
import logging
-from base import (
+from vmdebootstrap.base import (
Base,
runcmd,
mount_wrapper,
umount_wrapper
)
-from uefi import Uefi, arch_table
+from vmdebootstrap.uefi import Uefi, arch_table
# pylint: disable=missing-docstring
diff --git a/uefi.py b/vmdebootstrap/uefi.py
index 37731ba..82bf1eb 100644
--- a/uefi.py
+++ b/vmdebootstrap/uefi.py
@@ -24,7 +24,7 @@
import os
import cliapp
import logging
-from base import Base
+from vmdebootstrap.base import Base, runcmd
# pylint: disable=missing-docstring