Author: gnichols
Date: 2010-03-11 14:11:52 +0000 (Thu, 11 Mar 2010)
New Revision: 452
Added:
trunk/tools/bin/
trunk/tools/bin/Makefile
trunk/tools/bin/v7-mount-data-image
Log:
tools installation
Added: trunk/tools/bin/Makefile
===================================================================
--- trunk/tools/bin/Makefile (rev 0)
+++ trunk/tools/bin/Makefile 2010-03-11 14:11:52 UTC (rev 452)
@@ -0,0 +1,26 @@
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. 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; without even the implied warranty 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.
+#
+# Author: Greg Nichols
+
+HERE=$(shell pwd)
+
+.PHONY: clean install
+
+SUBDIRS := tools rhts
+
+FILES := v7-mount-data-image
+
+all install:
+ mkdir -p $(DESTDIR)/usr/bin
+ for file in $(FILES); do install -m 755 $$file $(DESTDIR)/usr/bin; done
Added: trunk/tools/bin/v7-mount-data-image
===================================================================
--- trunk/tools/bin/v7-mount-data-image (rev 0)
+++ trunk/tools/bin/v7-mount-data-image 2010-03-11 14:11:52 UTC (rev 452)
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. 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; without even the implied warranty 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.
+#
+# Author: Greg Nichols
+#
+
+import os,sys
+v7ClassLibraryPath = '/usr/share/v7/lib/'
+sys.path.append(v7ClassLibraryPath)
+os.putenv("PYTHONPATH", v7ClassLibraryPath)
+
+from v7.test import Test
+from v7.hardwaretest import HardwareTestHarness
+from v7.fvtest import FvTest
+from optparse import OptionParser
+
+# i18n!
+from rhpl.translate import _, py_bind_textdomain_codeset
+py_bind_textdomain_codeset("v7","UTF-8")
+
+# bail out if user is not root
+if os.getuid() > 0:
+ sys.stderr.write(_("You need to be root to run this program.\n"))
+ sys.exit(1)
+
+usage = "usage: %prog [options]"
+
+parser = OptionParser(usage)
+
+parser.add_option("-m", "--mount",
+ action="store_true", dest="mount", default=True,
+ help="Mount the data image")
+parser.add_option("-u", "--unmount",
+ action="store_true", dest="unmount",
default=False,
+ help="unmount the data image")
+
+(options,args) = parser.parse_args()
+
+fvTest = FvTest("fv_generic")
+if options.unmount:
+ fvTest.unmountDataImage()
+else:
+ fvTest.mountDataImage()
+
+
+
Property changes on: trunk/tools/bin/v7-mount-data-image
___________________________________________________________________
Name: svn:executable
+ *
Show replies by date