|
|
@ -1,12 +1,12 @@ |
|
|
|
#!/bin/sh |
|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# |
|
|
|
# Filename: src/tools-source/uname_wrapper.in.sh |
|
|
|
# Copyright (C) 2007 The OpenSDE Project |
|
|
|
# |
|
|
|
# Copyright (C) 2007 - 2011 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
|
# |
|
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
|
# it under the terms of the GNU General Public License as published by |
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
|
@ -93,8 +93,8 @@ if [ -n "$kernel_release" ]; then |
|
|
|
# do i have kernel sources? |
|
|
|
if [ -L $root/usr/src/linux ]; then |
|
|
|
ver=$( readlink $root/usr/src/linux | cut -d- -f2- ) |
|
|
|
elif [ -r $root/var/adm/packages/linux26 ]; then |
|
|
|
ver0=$( sed -n -e 's,^Package Name and Version: [^ ]\+ \([^ ]\+\) .*,\1,p' $root/var/adm/packages/linux26 ) |
|
|
|
elif [ -r $root/var/adm/packages/linux ]; then |
|
|
|
ver0=$( sed -n -e 's,^Package Name and Version: [^ ]\+ \([^ ]\+\) .*,\1,p' $root/var/adm/packages/linux ) |
|
|
|
ver=$( ls -1t $root/boot/vmlinuz_${ver0}* | sed -e 's,.*/vmlinuz_\(.*\),\1,' | tail -n 1 ) |
|
|
|
elif [ -r $root/var/adm/packages/linux-header ]; then |
|
|
|
ver0=$( sed -n -e 's,^Package Name and Version: [^ ]\+ \([^ ]\+\) .*,\1,p' $root/var/adm/packages/linux-header ) |
|
|
|