The new si_mkbootpackage command in 3.8.0 is very nice! I'm using it for 
a simple task that I used to do manually: inserting SSH keys into 
initrds, and always starting sshd on boot. I've got one enhancement 
request: I'd like to be able to select the target architecture, like I 
can with si_mkautoinstallcd.

This patch adds an "--arch" option to si_mkbootpackage which gets passed 
down to create_uyok_initrd(). I tested it quickly by creating a 64-bit 
initrd and installing RHEL4, but could someone give it a try, or at 
least a sanity check?

Thanks!

   Josh


Index: sbin/si_mkbootpackage
===================================================================
--- sbin/si_mkbootpackage       (revision 3954)
+++ sbin/si_mkbootpackage       (working copy)
@@ -80,6 +80,9 @@
  --help               
     Display this output.
 
+ --arch ARCH
+    The CPU architecture of the resulting initrd boot image
+
  --destination DIR
     The destination directory to put the new boot package (kernel and
     initrd.img).
@@ -141,6 +144,7 @@
 
 GetOptions(
     "help"                 => \my $help,
+    "arch=s"               => \my $img_arch,
     "quiet"                => \my $quiet,
     "destination=s"        => \my $destination,
     "my-modules"           => \my $my_modules,
@@ -254,7 +258,7 @@
 # Usage:
 # create_boot_package();
 sub create_boot_package {
-    my $arch = get_arch();
+    my $arch = $img_arch ? $img_arch : get_arch();
     my $verbose = 1 unless($quiet);
 
     SystemImager::UseYourOwnKernel->create_uyok_initrd(
Index: doc/man/si_mkbootpackage.content.sgml
===================================================================
--- doc/man/si_mkbootpackage.content.sgml       (revision 3954)
+++ doc/man/si_mkbootpackage.content.sgml       (working copy)
@@ -36,6 +36,7 @@
       <arg><option>--my-modules</option></arg>
       <arg><option>--kernel 
<replaceable>FILE</replaceable></option><option> --modules-dir 
<replaceable>DIR</replaceable></option></arg>
       <arg><option>--image 
<replaceable>IMAGENAME</replaceable></option></arg>
+      <arg><option>--arch <replaceable>ARCH</replaceable></option></arg>
       <arg><option>--filesystem 
<replaceable>FILESYSTEM</replaceable></option></arg>
       <arg><option>--ssh-key <replaceable>FILE</replaceable></option></arg>
       <arg><option>--authorized-keys 
<replaceable>FILE</replaceable></option></arg>
@@ -128,6 +129,14 @@
         </listitem>
       </varlistentry>
       <varlistentry>
+        <term><option>--arch 
<replaceable>ARCH</replaceable></option></term>
+        <listitem>
+          <para>
+            Build the initial ramdisk for CPU architecture ARCH.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
         <term><option>--filesystem 
<replaceable>FILESYSTEM</replaceable></option></term>
         <listitem>
           <para>



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sisuite-devel mailing list
sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to