[multiboot-media-creator/python-development] Added version info
by Robert 'Bob' Jensen
commit 776d5c615e457fd5b75fdd27e2314daf95e2a8cf
Author: Robert 'Bob' Jensen <rpjensen(a)ws02.home.bobjensen.com>
Date: Wed Jan 5 14:52:03 2011 -0600
Added version info
multiboot-media-creator.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index c530ca5..ef9bf77 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -16,6 +16,11 @@
import os, glob, tempfile, shutil
+__version__ = "$Revision: 4 $"
+# $Source$
+
+VERSION = '0.4.0'
+
def lives():
"""This part handles live images"""
13 years, 2 months
[multiboot-media-creator/python-development] Cleaned up imports
by Robert 'Bob' Jensen
commit ac03bfbe1a4e22c364561d3cefc6ac3df9f6d7f7
Author: Robert 'Bob' Jensen <rpjensen(a)ws02.home.bobjensen.com>
Date: Wed Jan 5 14:50:33 2011 -0600
Cleaned up imports
multiboot-media-creator.py | 34 ++++++++++------------------------
1 files changed, 10 insertions(+), 24 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index 160707c..c530ca5 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -14,10 +14,7 @@
### Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
### multiboot-media-creator Copyright 2010-2011 Robert 'Bob' Jensen <bob(a)fedoraunity.org>, Dave Riches <email>, Dennis Johnson <email>, Ben Williams <email>
-import os
-import glob
-import tempfile
-import shutil
+import os, glob, tempfile, shutil
def lives():
"""This part handles live images"""
@@ -32,18 +29,18 @@ def getisos(isopath):
isopath=os.path.join(isopath, "*.iso")
return glob.glob(isopath)
-def makedirs(iso):
- BN=iso.strip(".iso"+path)
- os.makedirs(os.path.join(mytemp, BN,"boot"))
- os.makedirs(os.path.join(mytemp, BN,"images"))
- os.makedirs(os.path.join(mytemp, BN,"CHECKSUM"))
- os.makedirs(os.path.join(mytemp, BN,"tmp"))
+def makedirs():
+ for i in getisos(path):
+ BN=i.strip(".iso"+path)
+ os.makedirs(os.path.join(mytemp, BN,"boot"))
+ os.makedirs(os.path.join(mytemp, BN,"images"))
+ os.makedirs(os.path.join(mytemp, BN,"CHECKSUM"))
+ os.makedirs(os.path.join(mytemp, BN,"tmp"))
print mytemp
def mount_iso(iso):
BN=iso.strip(".iso"+path)
os.system("mount -o loop %s %s" % (iso, os.path.join(mytemp, BN, "tmp")))
- return os.path.join(mytemp, BN, "tmp")
def umount_iso(iso):
BN=iso.strip(".iso"+path)
@@ -52,16 +49,5 @@ def umount_iso(iso):
def removetemps():
shutil.rmtree(mytemp)
-def mount_and_steal():
- """Realistically, this is only here to prove things are working. It will create the temps
-then mount the isos, then steal the kernels, then un-mount the isos. You get the idea"""
- for i in getisos(path):
- makedirs(i)
- BN=i.strip(".iso"+path)
- mount_path=mount_iso(i)
- print "Mounted iso: %s" % i
- print "Mount point is: %s" % mount_path
- shutil.copy2(mount_path+"/isolinux/vmlinuz0",os.path.join(mytemp, BN,"images/"))
- print "Stole the kernel"
- umount_iso(i)
- print "Un-mounted iso: %s" % i
+if __name__ == "__main__":
+ makedirs()
13 years, 2 months
[multiboot-media-creator/python-development: 1/2] refactored mount/umount and makedirs(). Added mount_and_steal test function
by Dave Riches
commit b3e8fbba51eab5a546519831d0d16639fb8d80ab
Author: Dave Riches <dcr226(a)fedorapeople.org>
Date: Wed Jan 5 20:45:16 2011 +0000
refactored mount/umount and makedirs(). Added mount_and_steal test function
multiboot-media-creator.py | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index b9bdf68..a5b0a5b 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -17,18 +17,18 @@ def getisos(isopath):
isopath=os.path.join(isopath, "*.iso")
return glob.glob(isopath)
-def makedirs():
- for i in getisos(path):
- BN=i.strip(".iso"+path)
- os.makedirs(os.path.join(mytemp, BN,"boot"))
- os.makedirs(os.path.join(mytemp, BN,"images"))
- os.makedirs(os.path.join(mytemp, BN,"CHECKSUM"))
- os.makedirs(os.path.join(mytemp, BN,"tmp"))
+def makedirs(iso):
+ BN=iso.strip(".iso"+path)
+ os.makedirs(os.path.join(mytemp, BN,"boot"))
+ os.makedirs(os.path.join(mytemp, BN,"images"))
+ os.makedirs(os.path.join(mytemp, BN,"CHECKSUM"))
+ os.makedirs(os.path.join(mytemp, BN,"tmp"))
print mytemp
def mount_iso(iso):
BN=iso.strip(".iso"+path)
os.system("mount -o loop %s %s" % (iso, os.path.join(mytemp, BN, "tmp")))
+ return os.path.join(mytemp, BN, "tmp")
def umount_iso(iso):
BN=iso.strip(".iso"+path)
@@ -37,5 +37,16 @@ def umount_iso(iso):
def removetemps():
shutil.rmtree(mytemp)
-if __name__ == "__main__":
- makedirs()
+def mount_and_steal():
+ """Realistically, this is only here to prove things are working. It will create the temps
+then mount the isos, then steal the kernels, then un-mount the isos. You get the idea"""
+ for i in getisos(path):
+ makedirs(i)
+ BN=i.strip(".iso"+path)
+ mount_path=mount_iso(i)
+ print "Mounted iso: %s" % i
+ print "Mount point is: %s" % mount_path
+ shutil.copy2(mount_path+"/isolinux/vmlinuz0",os.path.join(mytemp, BN,"images/"))
+ print "Stole the kernel"
+ umount_iso(i)
+ print "Un-mounted iso: %s" % i
13 years, 2 months
[multiboot-media-creator/python-development] Added License Header
by Robert 'Bob' Jensen
commit f900bb430ff68f57a2f8ae00a3a6884595542d3b
Author: Robert 'Bob' Jensen <rpjensen(a)ws02.home.bobjensen.com>
Date: Wed Jan 5 14:39:56 2011 -0600
Added License Header
bin/multiboot-media-creator | 3 +--
multiboot-media-creator.py | 15 +++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/bin/multiboot-media-creator b/bin/multiboot-media-creator
index 8b81d3c..5b78cca 100755
--- a/bin/multiboot-media-creator
+++ b/bin/multiboot-media-creator
@@ -54,9 +54,8 @@ EOT
CS=$(echo ${BN} | sed "s/DVD/CHECKSUM/g")
# cp -fv $CS* image/${BN}/CHECKSUM/
rsync -avH --progress $CS* image/${BN}/CHECKSUM/
-# umount -v tmp
+ umount -v tmp
fi
- umount -v tmp
done
rsync -avH /boot/grub/splash.xpm.gz image/boot/grub/
cat >> image/boot/grub/grub.conf <<EOT
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index b9bdf68..d04d178 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -1,4 +1,19 @@
#!/bin/python
+
+### This program is free software; you can redistribute it and/or modify it
+### under the terms of the GNU Library General Public License as published by
+### the Free Software Foundation; version 2 only
+###
+### This program is distributed in the hope that it will be useful, but WITHOUT
+### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+### FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+### License for more details.
+###
+### You should have received a copy of the GNU Library General Public License
+### along with this program; if not, write to the Free Software
+### Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+### multiboot-media-creator Copyright 2010-2011 Robert 'Bob' Jensen <bob(a)fedoraunity.org>, Dave Riches <email>, Dennis Johnson <email>, Ben Williams <email>
+
import os
import glob
import tempfile
13 years, 2 months
[multiboot-media-creator/python-development] added mount/umount functions
by Dave Riches
commit a5fca0079e567a8ec1800c24ab27fb7c5fb5c05d
Author: Dave Riches <dcr226(a)fedorapeople.org>
Date: Wed Jan 5 20:15:54 2011 +0000
added mount/umount functions
multiboot-media-creator.py | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index 867e624..b9bdf68 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -2,6 +2,7 @@
import os
import glob
import tempfile
+import shutil
def lives():
"""This part handles live images"""
@@ -10,20 +11,31 @@ def installs():
"""This part handles installation images"""
path=os.getcwd() # ok, so this will need to change
+mytemp=tempfile.mkdtemp(suffix=".mmc")
def getisos(isopath):
isopath=os.path.join(isopath, "*.iso")
return glob.glob(isopath)
def makedirs():
- mytemp=tempfile.mkdtemp()
for i in getisos(path):
BN=i.strip(".iso"+path)
os.makedirs(os.path.join(mytemp, BN,"boot"))
os.makedirs(os.path.join(mytemp, BN,"images"))
os.makedirs(os.path.join(mytemp, BN,"CHECKSUM"))
+ os.makedirs(os.path.join(mytemp, BN,"tmp"))
print mytemp
-
+
+def mount_iso(iso):
+ BN=iso.strip(".iso"+path)
+ os.system("mount -o loop %s %s" % (iso, os.path.join(mytemp, BN, "tmp")))
+
+def umount_iso(iso):
+ BN=iso.strip(".iso"+path)
+ os.system("umount %s" % (iso))
+
+def removetemps():
+ shutil.rmtree(mytemp)
if __name__ == "__main__":
makedirs()
13 years, 2 months
[multiboot-media-creator/python-development] now creates the required directories in /tmp
by Dave Riches
commit 6c2e592fcaed21a7f360240f44a10990d22c10ac
Author: Dave Riches <dcr226(a)fedorapeople.org>
Date: Wed Jan 5 19:31:34 2011 +0000
now creates the required directories in /tmp
multiboot-media-creator.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index db24484..867e624 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -1,6 +1,7 @@
#!/bin/python
import os
import glob
+import tempfile
def lives():
"""This part handles live images"""
@@ -15,8 +16,14 @@ def getisos(isopath):
return glob.glob(isopath)
def makedirs():
+ mytemp=tempfile.mkdtemp()
for i in getisos(path):
- print i
+ BN=i.strip(".iso"+path)
+ os.makedirs(os.path.join(mytemp, BN,"boot"))
+ os.makedirs(os.path.join(mytemp, BN,"images"))
+ os.makedirs(os.path.join(mytemp, BN,"CHECKSUM"))
+ print mytemp
+
if __name__ == "__main__":
makedirs()
13 years, 2 months
[multiboot-media-creator/python-development] added list isos in path
by Dave Riches
commit 03f20f7c1c5afb8e1b21d81f96b64124666943d1
Author: Dave Riches <dcr226(a)fedorapeople.org>
Date: Wed Jan 5 19:10:45 2011 +0000
added list isos in path
multiboot-media-creator.py | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
index 1d9d668..db24484 100644
--- a/multiboot-media-creator.py
+++ b/multiboot-media-creator.py
@@ -1,7 +1,22 @@
#!/bin/python
+import os
+import glob
def lives():
- """This part handles live images""""
+ """This part handles live images"""
def installs():
- """"This part handles installation images"""
+ """This part handles installation images"""
+
+path=os.getcwd() # ok, so this will need to change
+
+def getisos(isopath):
+ isopath=os.path.join(isopath, "*.iso")
+ return glob.glob(isopath)
+
+def makedirs():
+ for i in getisos(path):
+ print i
+
+if __name__ == "__main__":
+ makedirs()
13 years, 2 months
[multiboot-media-creator/python-development] started python development
by Dave Riches
commit d714c5ca9bcf1750396d33c9926000b9c7f64205
Author: Dave Riches <dcr226(a)fedorapeople.org>
Date: Wed Jan 5 18:28:10 2011 +0000
started python development
multiboot-media-creator.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/multiboot-media-creator.py b/multiboot-media-creator.py
new file mode 100644
index 0000000..1d9d668
--- /dev/null
+++ b/multiboot-media-creator.py
@@ -0,0 +1,7 @@
+#!/bin/python
+
+def lives():
+ """This part handles live images""""
+
+def installs():
+ """"This part handles installation images"""
13 years, 2 months