From 7782d2a9872d0d8f06d25c1d9c2d3d4e969bb9fe Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 24 Jun 2008 23:26:30 -0400 Subject: [PATCH] Add a --id option to ksplice-create. Signed-off-by: Anders Kaseorg --- ksplice-create.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ksplice-create.in b/ksplice-create.in index f3ff0b5..37ba6d7 100755 --- a/ksplice-create.in +++ b/ksplice-create.in @@ -23,12 +23,13 @@ use warnings; use lib 'KSPLICE_DATA_DIR'; use ksplice; -my ($patchfile, $diffext, $orig_config_dir, $postdir, $jobs); +my ($patchfile, $diffext, $orig_config_dir, $postdir, $jobs, $kid); my ($help, $wantversion, $prebuild, $skip_prebuild, $apply, $patch_opt) = (0, 0, 0, 0, 0, "-p1"); Getopt::Long::Configure("bundling"); GetOptions("help|?" => \$help, "version" => \$wantversion, "verbose|v!" => \$verbose, + "id=s" => \$kid, "patch=s" => \$patchfile, "diffext=s" => \$diffext, "prebuild" => \$prebuild, @@ -87,10 +88,7 @@ elsif($postdir =~ $linuxtree) { runval("cp", "--", "$orig_config_dir/.config", $linuxtree); my @chars = ('a'..'z', 0..9); -my $kid = ""; -for(my $z = 0; $z < 8; $z++) { - $kid .= $chars[int(rand(36))]; -} +$kid = join '', map { $chars[int(rand(36))] } 0..7 if(!defined $kid); my $ksplice = "ksplice-$kid"; # Some versions of Fedora have System.map files whose symbol addresses disagree @@ -343,6 +341,13 @@ specified options will be passed to B. This option can be repeated in order to pass multiple options to B. This option is ignored when the to-be-applied source code patch is specified using B<--diffext>. +=item B<--id=>I + +Specifies the unique value that will be used as the identifier of the +Ksplice update. This identifier will, for example, appear in the name +of the update tarball. By default, a random 8-character ID will be +generated. + =back =head1 BUGS -- 2.11.4.GIT