summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-12-04 09:46:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-12-04 09:46:53 +0000
commit048d1a94e990557da4a6fb8b7d7e2351a4d7203d (patch)
treeaf806c0c178f42c93cccedf32e3ac91dcb73fa94 /move
parent285e7dfba3b955ae7b0db2640e9abd959d15d08a (diff)
downloaddrakx-backup-do-not-use-048d1a94e990557da4a6fb8b7d7e2351a4d7203d.tar
drakx-backup-do-not-use-048d1a94e990557da4a6fb8b7d7e2351a4d7203d.tar.gz
drakx-backup-do-not-use-048d1a94e990557da4a6fb8b7d7e2351a4d7203d.tar.bz2
drakx-backup-do-not-use-048d1a94e990557da4a6fb8b7d7e2351a4d7203d.tar.xz
drakx-backup-do-not-use-048d1a94e990557da4a6fb8b7d7e2351a4d7203d.zip
inspect /export/Mandrake/RPMS to get the kernel version
Diffstat (limited to 'move')
-rwxr-xr-xmove/make_live7
1 files changed, 6 insertions, 1 deletions
diff --git a/move/make_live b/move/make_live
index 579b3de67..27f675266 100755
--- a/move/make_live
+++ b/move/make_live
@@ -9,7 +9,12 @@ my @langs = map { /^../; $& } @ALLOWED_LANGS;
@ARGV <= 1 or die "usage: make_live [live_location=/tmp/live_tree]\n";
-my $kernel_version = '2.4.22.21.1mdk';
+my $kernel_version = do {
+ my @l = glob_('/export/Mandrake/RPMS/kernel-2.*');
+ @l >= 1 or die "can't find kernel";
+ @l <= 1 or die "too many kernels";
+ first(`rpm -qp --qf '%{name}' $l[0]` =~ /kernel-(.*)/);
+};
sub installPackages {
output_p("$::prefix/etc/rpm/macros", "%_install_langs " . join(":", @langs) . "\n");