|
From: <ar...@sy...> - 2008-02-25 09:57:07
|
Author: arighi
Date: 2008-02-25 03:56:58 -0600 (Mon, 25 Feb 2008)
New Revision: 4412
Modified:
trunk/doc/man/si_prepareclient.content.sgml
trunk/sbin/si_prepareclient
Log:
- fix: the option --server must be not mandatory for si_prepareclient if
--no-rsyncd is specified
Modified: trunk/doc/man/si_prepareclient.content.sgml
===================================================================
--- trunk/doc/man/si_prepareclient.content.sgml 2008-02-24 16:33:13 UTC (rev 4411)
+++ trunk/doc/man/si_prepareclient.content.sgml 2008-02-25 09:56:58 UTC (rev 4412)
@@ -36,7 +36,6 @@
<arg><option>--quiet</option></arg>
<arg><option>-r</option></arg>
<arg><option>--unit MB | %</option></arg>
- <arg><option>--rpm-install</option></arg>
<arg><option>--yes</option></arg>
<arg rep=repeat><option>--exclude <replaceable>DISK</replaceable></option></arg>
<arg rep=repeat><option>-e <replaceable>DISK</replaceable></option></arg>
@@ -115,12 +114,6 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-r</option>, <option>--rpm-install</option></term>
- <listitem>
- <para>This is only used when building an RPM</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><option>--unit MB | %</option></term>
<listitem>
<para>
Modified: trunk/sbin/si_prepareclient
===================================================================
--- trunk/sbin/si_prepareclient 2008-02-24 16:33:13 UTC (rev 4411)
+++ trunk/sbin/si_prepareclient 2008-02-25 09:56:58 UTC (rev 4412)
@@ -121,36 +121,36 @@
my $help_info = $version_info . <<"EOF";
-Usage: $progname --server IMAGESERVER [OPTION]...
+Usage: $progname [OPTION]...
Options:
- --version
+ --version
Display version and copyright information.
- --help
+ --help
Display this output.
--server IMAGESERVER
- Where IMAGESERVER is either the IP address or host name of your
+ Where IMAGESERVER is either the IP address or host name of your
SystemImager server. Prepareclient makes your golden client's root
filesystem readable to other rsync capable machines. While this
access is read only, it may expose sensitive information. This
option limits access so that only your SystemImager server can read
your golden client's root filesystem.
- --no-rsyncd
+ --no-rsyncd
Do not start the rsync daemon.
- --yes
+ --yes
Answer yes to all yes/no questions.
--exclude, -e DISK [-e DISK...]
- Do not gather partition information for DISK(s). The result of
+ Do not gather partition information for DISK(s). The result of
using this option, is that DISK(s) will not be partitioned during
the auto-install process.
You may prefix DISK with "/dev/", but it is not necessary, and a
- base directory of /dev/ will be assumed.
+ base directory of /dev/ will be assumed.
Example: -e /dev/sdb -e sdc -e /dev/ida/c0d0 -e ida/c0d1
@@ -164,9 +164,6 @@
absolute values, otherwise with '%' all the values will be reported
in percentage relative to the total disk size. Default is MB.
- --rpm-install
- This is only used when building an RPM.
-
--no-uyok
Don't create a UYOK (Use Your Own Kernel) boot package. This option
is advantageous if you know you don't need a UYOK kernel, and you
@@ -182,7 +179,7 @@
Including all modules allows your UYOK kernel and initrd.img to be
used with a greater variety of client hardware, but can make the
- resultant initrd.img much larger.
+ resultant initrd.img much larger.
--kernel KERNEL
Do not detect the kernel to use with UYOK, but instead use the
@@ -232,7 +229,6 @@
"exclude-disk|e=s" => \my @exclude_disk,
"no-rsyncd|norsyncd" => \my $norsyncd,
"quiet" => \my $quiet,
- "rpm|rpm-install" => \my $rpm,
"no-uyok" => \my $no_uyok,
"unit=s" => \my $unit_of_measurement,
"my-modules" => \my $my_modules,
@@ -343,15 +339,16 @@
exit 1;
}
+if (($server) && ($norsyncd)) {
+ print "FATAL: --server option conflicts with --no-rsyncd!\n";
+ print qq(Try "$progname --help" for more info.\n);
+ exit 1;
+}
+
# Make sure we have certain tools that we need.
which('rsync') or croak("'rsync' is required for $progname to function properly. Please see http://systemimager.org for more details.");
which('systemconfigurator') or croak("'systemconfigurator' is required for $progname to function properly. Please see http://systemimager.org for more details.");
-# --rpm-install does the same thing as -no-rsyncd. -BEF-
-if($rpm) {
- $norsyncd = "1"; # set it to true.
-}
-
my $hosts_allow;
if($server) {
if($server =~ m/^(\d{1,3}\.){3}\d{1,3}$/) {
@@ -362,7 +359,7 @@
$hosts_allow .= "${_}/32 ";
}
}
-} else {
+} elsif (!($norsyncd)) {
print "$help_info";
print "Try the --server option.\n\n";
exit 1;
|