[PATCH/foreman 1/2] #1176 - SLES still did not display correct minor version

Signed-off-by: theforemanuser123 <oliver_weinmann@gmx.de>

··· --- app/models/host.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/app/models/host.rb b/app/models/host.rb
index 3916001…a08463c 100644
— a/app/models/host.rb
+++ b/app/models/host.rb
@@ -400,7 +400,7 @@ class Host < Puppet::Rails::Host

 os_name = fv(:operatingsystem)
 case os_name
  • when /suse/i
  • when /(suse|sles)/i
    orel = fv(:operatingsystemrelease)
    else
    orel = fv(:lsbdistrelease) || fv(:operatingsystemrelease)

    1.7.0.4

Signed-off-by: theforemanuser123 <oliver_weinmann@gmx.de>

··· --- app/views/unattended/jumpstart_finish.rhtml | 30 +++++++++++++++++-- extras/jumpstart/admin | 11 +++++++ extras/jumpstart/dynamic_finish | 4 ++ extras/jumpstart/rules | 2 +- .../jumpstart/sysidcfg/sysidcfg_primary/sysidcfg | 4 ++- 5 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 extras/jumpstart/admin

diff --git a/app/views/unattended/jumpstart_finish.rhtml b/app/views/unattended/jumpstart_finish.rhtml
index 3c61bb1…e89b55a 100644
— a/app/views/unattended/jumpstart_finish.rhtml
+++ b/app/views/unattended/jumpstart_finish.rhtml
@@ -10,11 +10,32 @@ logger “Starting finish script”
/usr/bin/perl -p -i -e “s/PermitRootLogin no/PermitRootLogin yes/” /etc/ssh/sshd_config

Now ensure that we have the newest puppet and facter installed

-/usr/bin/cp /var/pkg-get/admin-fullauto /var/pkg-get/admin > /dev/null
-/opt/csw/bin/pkg-get -U
-/opt/csw/bin/pkg-get -u -f CSWfacter CSWpuppet
+mount /proc
+/usr/bin/cat /etc/mnttab | sed -e ‘s//a///’ | sed -e ‘s//a//’ > /a/etc/mnttab
+/sbin/mount -F mntfs mnttab /etc/mnttab
+/usr/sbin/mknod /devices/pseudo/random@0:random c 190 0
+/usr/sbin/mknod /devices/pseudo/random@0:urandom c 190 1
+/usr/sbin/pkgadd -a /tmp/admin -d http://get.opencsw.org/now all
+/opt/csw/bin/pkgutil -U -y
+/opt/csw/bin/pkgutil -u -f -y CSWfacter CSWpuppet CSWwget

-echo “Configuring puppet”
+/usr/bin/echo “Creating helper startup script to start puppet”
+ONETIME=S99.enable.puppet
+/usr/bin/cat > /etc/rc3.d/$ONETIME << EOF
+#!/bin/sh
+#
+# $ONETIME
+#
+# runs once at startup and then removes itself.
+#
+PATH=/usr/bin:/usr/sbin; export PATH
+/usr/sbin/svccfg import /var/opt/csw/svc/manifest/network/cswpuppetd.xml
+/usr/sbin/svcadm enable svc:/network/cswpuppetd
+sleep 2
+rm $0
+EOF
+
+/usr/bin/echo "Configuring puppet"
cat > /etc/puppet/puppet.conf << EOF
<%= snippets “puppet.conf” -%>
EOF
@@ -24,6 +45,7 @@ then
rm -f /etc/opt/csw/puppet/puppetd.conf
ln -s /etc/puppet/puppet.conf /etc/opt/csw/puppet/puppetd.conf
fi
+/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize
echo “Informing Foreman that we are built”
/opt/csw/bin/wget --no-check-certificate -O /dev/null <%= foreman_url %>
exit 0
diff --git a/extras/jumpstart/admin b/extras/jumpstart/admin
new file mode 100644
index 0000000…7862beb
— /dev/null
+++ b/extras/jumpstart/admin
@@ -0,0 +1,11 @@
+mail=
+instance=overwrite
+partial=nocheck
+runlevel=nocheck
+idepend=nocheck
+rdepend=nocheck
+space=nocheck
+setuid=nocheck
+conflict=nocheck
+action=nocheck
+basedir=default
diff --git a/extras/jumpstart/dynamic_finish b/extras/jumpstart/dynamic_finish
index 96ea442…4a9afc9 100755
— a/extras/jumpstart/dynamic_finish
+++ b/extras/jumpstart/dynamic_finish
@@ -7,6 +7,10 @@ foreman=foreman

Copy the working nsswitch and resolv.conf into the new server’s etc directory

cp /etc/nsswitch.conf /a/etc
cp /etc/resolv.conf /a/etc
+# Copy the mnttab into the new server’s etc directory so we can use pkgadd to install OpenCSW
+cp /etc/mnttab /a/etc/mnttab
+# Copy the admin file into the new servers tmp directory
+cp -p ./admin /a/tmp

Make a working curl available

echo "Copying ./curl.$arch /a/tmp/curl"
cp -p ./curl.$arch /a/tmp/curl
diff --git a/extras/jumpstart/rules b/extras/jumpstart/rules
index 5976653…0e002d0 100644
— a/extras/jumpstart/rules
+++ b/extras/jumpstart/rules
@@ -1 +1 @@
-any - dynamic_profiler = -
+any - dynamic_profile = dynamic_finish
diff --git a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
index a4fb626…cc1537a 100644
— a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
+++ b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
@@ -6,5 +6,7 @@ terminal=vt100
timeserver=localhost
name_service=none
nfs4_domain=default
-root_password={FILTERED]
+#root_password=test1234
+root_password=eAMxlivHbTMtQ
auto_reg=disable
+keyboard=US-English

1.7.0.4

on which versions of Solaris was this tested? I have no problem to
merge this, but i would be happy to get Pauls +1 on it if possible.

Ohad

··· On Mon, Jan 9, 2012 at 7:37 PM, theforemanuser123 wrote: > > Signed-off-by: theforemanuser123 > --- > app/views/unattended/jumpstart_finish.rhtml | 30 +++++++++++++++++-- > extras/jumpstart/admin | 11 +++++++ > extras/jumpstart/dynamic_finish | 4 ++ > extras/jumpstart/rules | 2 +- > .../jumpstart/sysidcfg/sysidcfg_primary/sysidcfg | 4 ++- > 5 files changed, 45 insertions(+), 6 deletions(-) > create mode 100644 extras/jumpstart/admin > > diff --git a/app/views/unattended/jumpstart_finish.rhtml b/app/views/unattended/jumpstart_finish.rhtml > index 3c61bb1..e89b55a 100644 > --- a/app/views/unattended/jumpstart_finish.rhtml > +++ b/app/views/unattended/jumpstart_finish.rhtml > @@ -10,11 +10,32 @@ logger "Starting finish script" > /usr/bin/perl -p -i -e "s/PermitRootLogin no/PermitRootLogin yes/" /etc/ssh/sshd_config > > # Now ensure that we have the newest puppet and facter installed > -/usr/bin/cp /var/pkg-get/admin-fullauto /var/pkg-get/admin > /dev/null > -/opt/csw/bin/pkg-get -U > -/opt/csw/bin/pkg-get -u -f CSWfacter CSWpuppet > +mount /proc > +/usr/bin/cat /etc/mnttab | sed -e 's/\/a/\//' | sed -e 's/\/a//' > /a/etc/mnttab > +/sbin/mount -F mntfs mnttab /etc/mnttab > +/usr/sbin/mknod /devices/pseudo/random@0:random c 190 0 > +/usr/sbin/mknod /devices/pseudo/random@0:urandom c 190 1 > +/usr/sbin/pkgadd -a /tmp/admin -d http://get.opencsw.org/now all > +/opt/csw/bin/pkgutil -U -y > +/opt/csw/bin/pkgutil -u -f -y CSWfacter CSWpuppet CSWwget > > -echo "Configuring puppet" > +/usr/bin/echo "Creating helper startup script to start puppet" > +ONETIME=S99.enable.puppet > +/usr/bin/cat > /etc/rc3.d/$ONETIME < +#!/bin/sh > +# > +# $ONETIME > +# > +# runs once at startup and then removes itself. > +# > +PATH=/usr/bin:/usr/sbin; export PATH > +/usr/sbin/svccfg import /var/opt/csw/svc/manifest/network/cswpuppetd.xml > +/usr/sbin/svcadm enable svc:/network/cswpuppetd > +sleep 2 > +rm \$0 > +EOF > + > +/usr/bin/echo "Configuring puppet" > cat > /etc/puppet/puppet.conf < <%= snippets "puppet.conf" -%> > EOF > @@ -24,6 +45,7 @@ then > rm -f /etc/opt/csw/puppet/puppetd.conf > ln -s /etc/puppet/puppet.conf /etc/opt/csw/puppet/puppetd.conf > fi > +/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize > echo "Informing Foreman that we are built" > /opt/csw/bin/wget --no-check-certificate -O /dev/null <%= foreman_url %> > exit 0 > diff --git a/extras/jumpstart/admin b/extras/jumpstart/admin > new file mode 100644 > index 0000000..7862beb > --- /dev/null > +++ b/extras/jumpstart/admin > @@ -0,0 +1,11 @@ > +mail= > +instance=overwrite > +partial=nocheck > +runlevel=nocheck > +idepend=nocheck > +rdepend=nocheck > +space=nocheck > +setuid=nocheck > +conflict=nocheck > +action=nocheck > +basedir=default > diff --git a/extras/jumpstart/dynamic_finish b/extras/jumpstart/dynamic_finish > index 96ea442..4a9afc9 100755 > --- a/extras/jumpstart/dynamic_finish > +++ b/extras/jumpstart/dynamic_finish > @@ -7,6 +7,10 @@ foreman=foreman > # Copy the working nsswitch and resolv.conf into the new server's etc directory > cp /etc/nsswitch.conf /a/etc > cp /etc/resolv.conf /a/etc > +# Copy the mnttab into the new server's etc directory so we can use pkgadd to install OpenCSW > +cp /etc/mnttab /a/etc/mnttab > +# Copy the admin file into the new servers tmp directory > +cp -p ./admin /a/tmp > # Make a working curl available > echo "Copying ./curl.$arch /a/tmp/curl" > cp -p ./curl.$arch /a/tmp/curl > diff --git a/extras/jumpstart/rules b/extras/jumpstart/rules > index 5976653..0e002d0 100644 > --- a/extras/jumpstart/rules > +++ b/extras/jumpstart/rules > @@ -1 +1 @@ > -any - dynamic_profiler = - > +any - dynamic_profile = dynamic_finish > diff --git a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > index a4fb626..cc1537a 100644 > --- a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > +++ b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > @@ -6,5 +6,7 @@ terminal=vt100 > timeserver=localhost > name_service=none > nfs4_domain=default > -root_password={FILTERED] > +#root_password=test1234 > +root_password=eAMxlivHbTMtQ > auto_reg=disable > +keyboard=US-English > -- > 1.7.0.4 >

Afaik tested with solaris 10 (and maybe 11) on x86 and SPARC

··· On 10 Jan., 19:47, Ohad Levy wrote: > On Mon, Jan 9, 2012 at 7:37 PM, theforemanuser123 > > > > > > > > > > wrote: > > > Signed-off-by: theforemanuser123 > > --- > > app/views/unattended/jumpstart_finish.rhtml | 30 +++++++++++++++++-- > > extras/jumpstart/admin | 11 +++++++ > > extras/jumpstart/dynamic_finish | 4 ++ > > extras/jumpstart/rules | 2 +- > > .../jumpstart/sysidcfg/sysidcfg_primary/sysidcfg | 4 ++- > > 5 files changed, 45 insertions(+), 6 deletions(-) > > create mode 100644 extras/jumpstart/admin > > > diff --git a/app/views/unattended/jumpstart_finish.rhtml b/app/views/unattended/jumpstart_finish.rhtml > > index 3c61bb1..e89b55a 100644 > > --- a/app/views/unattended/jumpstart_finish.rhtml > > +++ b/app/views/unattended/jumpstart_finish.rhtml > > @@ -10,11 +10,32 @@ logger "Starting finish script" > > /usr/bin/perl -p -i -e "s/PermitRootLogin no/PermitRootLogin yes/" /etc/ssh/sshd_config > > > # Now ensure that we have the newest puppet and facter installed > > -/usr/bin/cp /var/pkg-get/admin-fullauto /var/pkg-get/admin > /dev/null > > -/opt/csw/bin/pkg-get -U > > -/opt/csw/bin/pkg-get -u -f CSWfacter CSWpuppet > > +mount /proc > > +/usr/bin/cat /etc/mnttab | sed -e 's/\/a/\//' | sed -e 's/\/a//' > /a/etc/mnttab > > +/sbin/mount -F mntfs mnttab /etc/mnttab > > +/usr/sbin/mknod /devices/pseudo/random@0:random c 190 0 > > +/usr/sbin/mknod /devices/pseudo/random@0:urandom c 190 1 > > +/usr/sbin/pkgadd -a /tmp/admin -dhttp://get.opencsw.org/nowall > > +/opt/csw/bin/pkgutil -U -y > > +/opt/csw/bin/pkgutil -u -f -y CSWfacter CSWpuppet CSWwget > > > -echo "Configuring puppet" > > +/usr/bin/echo "Creating helper startup script to start puppet" > > +ONETIME=S99.enable.puppet > > +/usr/bin/cat > /etc/rc3.d/$ONETIME < > +#!/bin/sh > > +# > > +# $ONETIME > > +# > > +# runs once at startup and then removes itself. > > +# > > +PATH=/usr/bin:/usr/sbin; export PATH > > +/usr/sbin/svccfg import /var/opt/csw/svc/manifest/network/cswpuppetd.xml > > +/usr/sbin/svcadm enable svc:/network/cswpuppetd > > +sleep 2 > > +rm \$0 > > +EOF > > + > > +/usr/bin/echo "Configuring puppet" > > cat > /etc/puppet/puppet.conf < > <%= snippets "puppet.conf" -%> > > EOF > > @@ -24,6 +45,7 @@ then > > rm -f /etc/opt/csw/puppet/puppetd.conf > > ln -s /etc/puppet/puppet.conf /etc/opt/csw/puppet/puppetd.conf > > fi > > +/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize > > echo "Informing Foreman that we are built" > > /opt/csw/bin/wget --no-check-certificate -O /dev/null <%= foreman_url %> > > exit 0 > > diff --git a/extras/jumpstart/admin b/extras/jumpstart/admin > > new file mode 100644 > > index 0000000..7862beb > > --- /dev/null > > +++ b/extras/jumpstart/admin > > @@ -0,0 +1,11 @@ > > +mail= > > +instance=overwrite > > +partial=nocheck > > +runlevel=nocheck > > +idepend=nocheck > > +rdepend=nocheck > > +space=nocheck > > +setuid=nocheck > > +conflict=nocheck > > +action=nocheck > > +basedir=default > > diff --git a/extras/jumpstart/dynamic_finish b/extras/jumpstart/dynamic_finish > > index 96ea442..4a9afc9 100755 > > --- a/extras/jumpstart/dynamic_finish > > +++ b/extras/jumpstart/dynamic_finish > > @@ -7,6 +7,10 @@ foreman=foreman > > # Copy the working nsswitch and resolv.conf into the new server's etc directory > > cp /etc/nsswitch.conf /a/etc > > cp /etc/resolv.conf /a/etc > > +# Copy the mnttab into the new server's etc directory so we can use pkgadd to install OpenCSW > > +cp /etc/mnttab /a/etc/mnttab > > +# Copy the admin file into the new servers tmp directory > > +cp -p ./admin /a/tmp > > # Make a working curl available > > echo "Copying ./curl.$arch /a/tmp/curl" > > cp -p ./curl.$arch /a/tmp/curl > > diff --git a/extras/jumpstart/rules b/extras/jumpstart/rules > > index 5976653..0e002d0 100644 > > --- a/extras/jumpstart/rules > > +++ b/extras/jumpstart/rules > > @@ -1 +1 @@ > > -any - dynamic_profiler = - > > +any - dynamic_profile = dynamic_finish > > diff --git a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > index a4fb626..cc1537a 100644 > > --- a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > +++ b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > @@ -6,5 +6,7 @@ terminal=vt100 > > timeserver=localhost > > name_service=none > > nfs4_domain=default > > -root_password={FILTERED] > > +#root_password=test1234 > > +root_password=eAMxlivHbTMtQ > > auto_reg=disable > > +keyboard=US-English > > -- > > 1.7.0.4 > > on which versions of Solaris was this tested? I have no problem to > merge this, but i would be happy to get Pauls +1 on it if possible. > > Ohad

This looks good provisionally but I do not claim to be a great expert on
Solaris.

I like the "random" file creation that lets this work on a zfs based root
filessystem. (I never got this to work.) I also like the download from
get.opencsw.org as it is more general than the current solution. However,
this patch would benefit from the processing of $http_proxy values.

Also, this solution will only work with Solaris 10+ as it is svcs based.

Nice one Oliver
+1
or more realistically 0.99

··· On 10 January 2012 18:47, Ohad Levy wrote:

On Mon, Jan 9, 2012 at 7:37 PM, theforemanuser123 > oliver_weinmann@gmx.de wrote:

Signed-off-by: theforemanuser123 oliver_weinmann@gmx.de

app/views/unattended/jumpstart_finish.rhtml | 30
++++++++++++++++±-
extras/jumpstart/admin | 11 +++++++
extras/jumpstart/dynamic_finish | 4 ++
extras/jumpstart/rules | 2 ±
…/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg | 4 +±
5 files changed, 45 insertions(+), 6 deletions(-)
create mode 100644 extras/jumpstart/admin

diff --git a/app/views/unattended/jumpstart_finish.rhtml
b/app/views/unattended/jumpstart_finish.rhtml
index 3c61bb1…e89b55a 100644
— a/app/views/unattended/jumpstart_finish.rhtml
+++ b/app/views/unattended/jumpstart_finish.rhtml
@@ -10,11 +10,32 @@ logger “Starting finish script”
/usr/bin/perl -p -i -e “s/PermitRootLogin no/PermitRootLogin yes/”
/etc/ssh/sshd_config

Now ensure that we have the newest puppet and facter installed

-/usr/bin/cp /var/pkg-get/admin-fullauto /var/pkg-get/admin > /dev/null
-/opt/csw/bin/pkg-get -U
-/opt/csw/bin/pkg-get -u -f CSWfacter CSWpuppet
+mount /proc
+/usr/bin/cat /etc/mnttab | sed -e ‘s//a///’ | sed -e ‘s//a//’ >
/a/etc/mnttab
+/sbin/mount -F mntfs mnttab /etc/mnttab
+/usr/sbin/mknod /devices/pseudo/random@0:random c 190 0
+/usr/sbin/mknod /devices/pseudo/random@0:urandom c 190 1
+/usr/sbin/pkgadd -a /tmp/admin -d http://get.opencsw.org/now all
+/opt/csw/bin/pkgutil -U -y
+/opt/csw/bin/pkgutil -u -f -y CSWfacter CSWpuppet CSWwget

-echo “Configuring puppet”
+/usr/bin/echo “Creating helper startup script to start puppet”
+ONETIME=S99.enable.puppet
+/usr/bin/cat > /etc/rc3.d/$ONETIME << EOF
+#!/bin/sh
+#
+# $ONETIME
+#
+# runs once at startup and then removes itself.
+#
+PATH=/usr/bin:/usr/sbin; export PATH
+/usr/sbin/svccfg import /var/opt/csw/svc/manifest/network/cswpuppetd.xml
+/usr/sbin/svcadm enable svc:/network/cswpuppetd
+sleep 2
+rm $0
+EOF
+
+/usr/bin/echo "Configuring puppet"
cat > /etc/puppet/puppet.conf << EOF
<%= snippets “puppet.conf” -%>
EOF
@@ -24,6 +45,7 @@ then
rm -f /etc/opt/csw/puppet/puppetd.conf
ln -s /etc/puppet/puppet.conf /etc/opt/csw/puppet/puppetd.conf
fi
+/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags
no_such_tag --server puppet --no-daemonize
echo “Informing Foreman that we are built”
/opt/csw/bin/wget --no-check-certificate -O /dev/null <%= foreman_url %>
exit 0
diff --git a/extras/jumpstart/admin b/extras/jumpstart/admin
new file mode 100644
index 0000000…7862beb
— /dev/null
+++ b/extras/jumpstart/admin
@@ -0,0 +1,11 @@
+mail=
+instance=overwrite
+partial=nocheck
+runlevel=nocheck
+idepend=nocheck
+rdepend=nocheck
+space=nocheck
+setuid=nocheck
+conflict=nocheck
+action=nocheck
+basedir=default
diff --git a/extras/jumpstart/dynamic_finish
b/extras/jumpstart/dynamic_finish
index 96ea442…4a9afc9 100755
— a/extras/jumpstart/dynamic_finish
+++ b/extras/jumpstart/dynamic_finish
@@ -7,6 +7,10 @@ foreman=foreman

Copy the working nsswitch and resolv.conf into the new server’s etc

directory

cp /etc/nsswitch.conf /a/etc
cp /etc/resolv.conf /a/etc
+# Copy the mnttab into the new server’s etc directory so we can use
pkgadd to install OpenCSW
+cp /etc/mnttab /a/etc/mnttab
+# Copy the admin file into the new servers tmp directory
+cp -p ./admin /a/tmp

Make a working curl available

echo "Copying ./curl.$arch /a/tmp/curl"
cp -p ./curl.$arch /a/tmp/curl
diff --git a/extras/jumpstart/rules b/extras/jumpstart/rules
index 5976653…0e002d0 100644
— a/extras/jumpstart/rules
+++ b/extras/jumpstart/rules
@@ -1 +1 @@
-any - dynamic_profiler = -
+any - dynamic_profile = dynamic_finish
diff --git a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
index a4fb626…cc1537a 100644
— a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
+++ b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg
@@ -6,5 +6,7 @@ terminal=vt100
timeserver=localhost
name_service=none
nfs4_domain=default
-root_password={FILTERED]
+#root_password=test1234
+root_password=eAMxlivHbTMtQ
auto_reg=disable
+keyboard=US-English

1.7.0.4

on which versions of Solaris was this tested? I have no problem to
merge this, but i would be happy to get Pauls +1 on it if possible.

Ohad

Hi,

I think it would be easy to change it to also work on Solaris 8 by
creating symlinks to the cswpuppetd startup script but unfortunately I
don't have a up2date solaris 8 install media around to test it. My
install media is 2/02 and doesn't support dhcp install.

Regards,
Oliver

··· On 11 Jan., 11:52, paul kelly wrote: > This looks good provisionally but I do not claim to be a great expert on > Solaris. > > I like the "random" file creation that lets this work on a zfs based root > filessystem. (I never got this to work.) I also like the download from > get.opencsw.org as it is more general than the current solution. However, > this patch would benefit from the processing of $http_proxy values. > > Also, this solution will only work with Solaris 10+ as it is svcs based. > > Nice one Oliver > +1 > or more realistically 0.99 > On 10 January 2012 18:47, Ohad Levy wrote: > > > > > > > > > On Mon, Jan 9, 2012 at 7:37 PM, theforemanuser123 > > wrote: > > > > Signed-off-by: theforemanuser123 > > > --- > > > app/views/unattended/jumpstart_finish.rhtml | 30 > > +++++++++++++++++-- > > > extras/jumpstart/admin | 11 +++++++ > > > extras/jumpstart/dynamic_finish | 4 ++ > > > extras/jumpstart/rules | 2 +- > > > .../jumpstart/sysidcfg/sysidcfg_primary/sysidcfg | 4 ++- > > > 5 files changed, 45 insertions(+), 6 deletions(-) > > > create mode 100644 extras/jumpstart/admin > > > > diff --git a/app/views/unattended/jumpstart_finish.rhtml > > b/app/views/unattended/jumpstart_finish.rhtml > > > index 3c61bb1..e89b55a 100644 > > > --- a/app/views/unattended/jumpstart_finish.rhtml > > > +++ b/app/views/unattended/jumpstart_finish.rhtml > > > @@ -10,11 +10,32 @@ logger "Starting finish script" > > > /usr/bin/perl -p -i -e "s/PermitRootLogin no/PermitRootLogin yes/" > > /etc/ssh/sshd_config > > > > # Now ensure that we have the newest puppet and facter installed > > > -/usr/bin/cp /var/pkg-get/admin-fullauto /var/pkg-get/admin > /dev/null > > > -/opt/csw/bin/pkg-get -U > > > -/opt/csw/bin/pkg-get -u -f CSWfacter CSWpuppet > > > +mount /proc > > > +/usr/bin/cat /etc/mnttab | sed -e 's/\/a/\//' | sed -e 's/\/a//' > > > /a/etc/mnttab > > > +/sbin/mount -F mntfs mnttab /etc/mnttab > > > +/usr/sbin/mknod /devices/pseudo/random@0:random c 190 0 > > > +/usr/sbin/mknod /devices/pseudo/random@0:urandom c 190 1 > > > +/usr/sbin/pkgadd -a /tmp/admin -dhttp://get.opencsw.org/nowall > > > +/opt/csw/bin/pkgutil -U -y > > > +/opt/csw/bin/pkgutil -u -f -y CSWfacter CSWpuppet CSWwget > > > > -echo "Configuring puppet" > > > +/usr/bin/echo "Creating helper startup script to start puppet" > > > +ONETIME=S99.enable.puppet > > > +/usr/bin/cat > /etc/rc3.d/$ONETIME < > > +#!/bin/sh > > > +# > > > +# $ONETIME > > > +# > > > +# runs once at startup and then removes itself. > > > +# > > > +PATH=/usr/bin:/usr/sbin; export PATH > > > +/usr/sbin/svccfg import /var/opt/csw/svc/manifest/network/cswpuppetd.xml > > > +/usr/sbin/svcadm enable svc:/network/cswpuppetd > > > +sleep 2 > > > +rm \$0 > > > +EOF > > > + > > > +/usr/bin/echo "Configuring puppet" > > > cat > /etc/puppet/puppet.conf < > > <%= snippets "puppet.conf" -%> > > > EOF > > > @@ -24,6 +45,7 @@ then > > > rm -f /etc/opt/csw/puppet/puppetd.conf > > > ln -s /etc/puppet/puppet.conf /etc/opt/csw/puppet/puppetd.conf > > > fi > > > +/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags > > no_such_tag --server puppet --no-daemonize > > > echo "Informing Foreman that we are built" > > > /opt/csw/bin/wget --no-check-certificate -O /dev/null <%= foreman_url %> > > > exit 0 > > > diff --git a/extras/jumpstart/admin b/extras/jumpstart/admin > > > new file mode 100644 > > > index 0000000..7862beb > > > --- /dev/null > > > +++ b/extras/jumpstart/admin > > > @@ -0,0 +1,11 @@ > > > +mail= > > > +instance=overwrite > > > +partial=nocheck > > > +runlevel=nocheck > > > +idepend=nocheck > > > +rdepend=nocheck > > > +space=nocheck > > > +setuid=nocheck > > > +conflict=nocheck > > > +action=nocheck > > > +basedir=default > > > diff --git a/extras/jumpstart/dynamic_finish > > b/extras/jumpstart/dynamic_finish > > > index 96ea442..4a9afc9 100755 > > > --- a/extras/jumpstart/dynamic_finish > > > +++ b/extras/jumpstart/dynamic_finish > > > @@ -7,6 +7,10 @@ foreman=foreman > > > # Copy the working nsswitch and resolv.conf into the new server's etc > > directory > > > cp /etc/nsswitch.conf /a/etc > > > cp /etc/resolv.conf /a/etc > > > +# Copy the mnttab into the new server's etc directory so we can use > > pkgadd to install OpenCSW > > > +cp /etc/mnttab /a/etc/mnttab > > > +# Copy the admin file into the new servers tmp directory > > > +cp -p ./admin /a/tmp > > > # Make a working curl available > > > echo "Copying ./curl.$arch /a/tmp/curl" > > > cp -p ./curl.$arch /a/tmp/curl > > > diff --git a/extras/jumpstart/rules b/extras/jumpstart/rules > > > index 5976653..0e002d0 100644 > > > --- a/extras/jumpstart/rules > > > +++ b/extras/jumpstart/rules > > > @@ -1 +1 @@ > > > -any - dynamic_profiler = - > > > +any - dynamic_profile = dynamic_finish > > > diff --git a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > > index a4fb626..cc1537a 100644 > > > --- a/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > > +++ b/extras/jumpstart/sysidcfg/sysidcfg_primary/sysidcfg > > > @@ -6,5 +6,7 @@ terminal=vt100 > > > timeserver=localhost > > > name_service=none > > > nfs4_domain=default > > > -root_password={FILTERED] > > > +#root_password=test1234 > > > +root_password=eAMxlivHbTMtQ > > > auto_reg=disable > > > +keyboard=US-English > > > -- > > > 1.7.0.4 > > > on which versions of Solaris was this tested? I have no problem to > > merge this, but i would be happy to get Pauls +1 on it if possible. > > > Ohad