shaving the yast

So I wanted to have a play with packer but decided to have a look at autoyast while I am at it.

OpenSuSE 12.3 has a bug [BNC#801878] though that prevent the network and ssh to be started up.

And it seems the does not work as expected either since if always shut it down, or with updates enabled created an additional interface.

ended up not caring about the package updates (since the vagrant box would be outdated anyway) and instead doing this:

 <noscripts>
    <chroot-scripts config:type="list">
      <noscript>
        <!&#8212; FIXING BNC#801878 &#8212;>
        <filename>chroot_bugfixing_801878.sh</filename>
        <source><![CDATA[#!/bin/bash
        #Fix ag_initscripts according to BNC#801878
        sed -i &#39;s/.<strong>(/sbin/runlevel.</strong>)/SYSTEMCTL_OPTIONS="" 1/&#39; /mnt/usr/lib/YaST2/servers_non_y2/ag_initscripts
        ]]>
        </source>
      </noscript>
    </chroot-scripts>
    <postpartitioning-scripts config:type="list">
      <noscript>
        <filename>ssh_key_installation.sh</filename>
        <source><![CDATA[#!/bin/bash
         # Evaluate the http server IP PORT to retrieve the ssh key and then set it up
         httpServer=$( grep AutoYaST /etc/install.inf | sed &#39;s~.<strong>(http://.</strong>/).*~1~&#39; )
         httpUrl="${httpServer}/id_rsa_packer_images.pub"

         rootSsh=/mnt/root/.ssh
         mkdir -p ${rootSsh}
         wget "${httpUrl}" -O ${rootSsh}/authorized_keys
         chmod -R og-rwx ${rootSsh}

         verpackerSsh=/mnt/home/verpacker/.ssh
         mkdir -p ${verpackerSsh}
         wget "${httpUrl}" -O ${verpackerSsh}/authorized_keys
         chmod -R og-rwx ${verpackerSsh}
         chown -R 1000:100 /mnt/home/verpacker        
         ]]>
        </source>
      </noscript>         
    </postpartitioning-scripts>
    <post-scripts config:type="list">
      <noscript>
        <filename>post_script_no_network_shutdown.sh</filename>
        <source><![CDATA[#!/bin/bash
        # preventing the shut down of the network at the end of the installation
        sed -i &#39;s~(.*rcnetwork .*stop)~# removed by post_script_no_network_shutdown 1~&#39; /usr/lib/YaST2/startup/Second-Stage/S09-cleanup
        ]]>
        </source>
      </noscript>
    </post-scripts>    
  </noscripts>

ok, the ssh-key is for packer and not the network issues.

Packer : ~1 evening autoyast : ~5 evenings

I also decided to become a more sharing person :

https://bitbucket.org/markus_ebenhoeh/packer-opensuse.12.3

Leave a reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required

31 − 23 =