diff options
author | maximilian attems <maks@debian.org> | 2006-07-02 19:45:38 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2006-07-02 19:45:38 +0200 |
commit | af6f5f475221846f88a2bbda39a2a93d67556d07 (patch) | |
tree | faf7ade4e6f6bfa4819b688943c76d891674f2b0 | |
parent | 0d341b8d32810844ce035e89a9e60fb7a7dde4b6 (diff) | |
download | initramfs-tools-af6f5f475221846f88a2bbda39a2a93d67556d07.tar.gz initramfs-tools-af6f5f475221846f88a2bbda39a2a93d67556d07.zip |
- move check_minkver() to hook-functions
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | hook-functions | 31 | ||||
-rw-r--r-- | scripts/functions | 31 |
3 files changed, 38 insertions, 31 deletions
diff --git a/debian/changelog b/debian/changelog index 05140ed..5035086 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.68) unstable; urgency=low + + * script/functions, hook-functions: Move check_minkver() to the second + file as it uses dpkg and is run by mkinitramfs and not on boot. + + -- maximilian attems <maks@sternwelten.at> Sun, 2 Jul 2006 19:44:45 +0200 + initramfs-tools (0.67) unstable; urgency=high Release bella, ciao, ciao, ciao! diff --git a/hook-functions b/hook-functions index 6d41f2e..fe10cfe 100644 --- a/hook-functions +++ b/hook-functions @@ -226,3 +226,34 @@ EOF } +# minimal supported kernel version +check_minkver() +{ + curversion=${1} + initdir=${2} + set_initlist + if [ -z ${initdir} ]; then + DPKG_ARCH=`dpkg --print-installation-architecture` + case ${DPKG_ARCH} in + ia64|hppa) + minversion="2.6.15" + ;; + *) + minversion="2.6.12" + ;; + esac + if dpkg --compare-versions "${curversion}" lt "${minversion}"; then + echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + fi + [ -z ${initdir} ] || for cm_x in ${initlist}; do + tmp=$(eval echo $(grep ^MINKVER ${initdir}/${cm_x} | cut -d'=' -f2)) + if dpkg --compare-versions "${curversion}" lt "${tmp}"; then + echo "W: ${cm_x} hook script requires at least kernel version ${tmp}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + done +} diff --git a/scripts/functions b/scripts/functions index fea6956..c3a3e16 100644 --- a/scripts/functions +++ b/scripts/functions @@ -184,37 +184,6 @@ run_scripts() call_scripts } -check_minkver() -{ - curversion=${1} - initdir=${2} - set_initlist - if [ -z ${initdir} ]; then - DPKG_ARCH=`dpkg --print-installation-architecture` - case ${DPKG_ARCH} in - ia64|hppa) - minversion="2.6.15" - ;; - *) - minversion="2.6.12" - ;; - esac - if dpkg --compare-versions "${curversion}" lt "${minversion}"; then - echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 - echo "W: not generating requested initramfs for kernel ${curversion}" >&2 - exit 2 - fi - fi - [ -z ${initdir} ] || for cm_x in ${initlist}; do - tmp=$(eval echo $(grep ^MINKVER ${initdir}/${cm_x} | cut -d'=' -f2)) - if dpkg --compare-versions "${curversion}" lt "${tmp}"; then - echo "W: ${cm_x} hook script requires at least kernel version ${tmp}" >&2 - echo "W: not generating requested initramfs for kernel ${curversion}" >&2 - exit 2 - fi - done -} - # Load custom modules first load_modules() { |