From 285471c31284284d36a811b2bbd584104c3f9196 Mon Sep 17 00:00:00 2001 From: Laurentiu Palcu Date: Mon, 4 Feb 2013 13:36:51 +0200 Subject: update-modules: remove recipe from oe-core update-modules is not used anymore. Any references to it have been removed, some time ago, from all recipes/bbclasses. It stayed in oe-core in case anybody still wanted to use it. Time for it to go. (From OE-Core rev: b8c5f1facd9f9878e137f803b45e99d4e7214d20) Signed-off-by: Laurentiu Palcu Signed-off-by: Richard Purdie --- .../update-modules-1.0/update-modules | 209 --------------------- 1 file changed, 209 deletions(-) delete mode 100755 meta/recipes-kernel/update-modules/update-modules-1.0/update-modules (limited to 'meta/recipes-kernel/update-modules/update-modules-1.0/update-modules') diff --git a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules deleted file mode 100755 index 99040a1ab4..0000000000 --- a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules +++ /dev/null @@ -1,209 +0,0 @@ -#!/bin/sh -# -# This is the update-modules script for Debian GNU/Linux. -# Copyright 1998-2001 Wichert Akkerman -# Licensed under the GNU GPL, version 2 -# - -MODCONFFILE=/etc/modules.conf -MODCONFTMPFILE="${MODCONFFILE}.$$" -MODULESFILE=/etc/modules -MODULESTMPFILE="${MODULESFILE}.$$" - -ARCHDIR=/etc/modutils/arch -CPUDIR=/etc/modutils/cpu -HEADER="### This file is automatically generated by update-modules" - -set -e - -if [ "$1" = "force" ] ; then - force=1 -else - force= -fi - -# Reset the sorting order since we depend on it -LC_COLLATE=C -export LC_COLLATE - -depdir() -{ - dep=`grep '[[:space:]]*depfile' "${MODCONFFILE}" | tail -n 1 | sed -e 's/depfile=//' -e 's,/[^/]*$,,'` - if [ -z "$dep" ] ; then - dep="/lib/modules/`uname -r`" - fi - - echo $dep -} - -arch() { - local model=`uname -m` - case $model in - i[0-9]86) model=i386; ;; - sun4u) model=sparc64; ;; - arm*) model=arm; ;; - ppc) model=powerpc; ;; - esac - echo $model -} - -archmodel() { - local arch=`arch` - local model="" - if [ $arch = "m68k" ]; then - if [ -f /proc/hardware ]; then - model=`sed -ne 's/^Model:[[:space:]]*//p' /proc/hardware` - case $model in - Atari*) model="atari"; ;; - Amiga*) model="amiga"; ;; - Macintosh*) model="mac"; ;; - Motorola*) model="MVME"; ;; - *) model="generic"; ;; - esac - model=".${model}" - else - echo "/proc/hardware does not exist, assuming general m68k system" - model=".generic" - fi - elif [ $arch = "powerpc" ]; then - if [ -f /proc/cpuinfo ]; then - model=`sed -ne 's/^machine[[:space:]]*:[[:space:]]*//p' /proc/cpuinfo` - case $model in - Amiga*) model="apus"; ;; - Power*) model="pmac"; ;; - *) model="generic"; ;; - esac - model=".${model}" - else - echo "/proc/cpuinfo does not exist, assuming general powerpc system" - model=".generic" - fi - fi - echo "${arch}${model}" -} - -checkoverwrite() { - local cfgfile="$1" - - if [ -f "$cfgfile" ]; then - if ! sed -ne 1p "$cfgfile" | grep -q "^$HEADER" ; then - echo "Error: the current $cfgfile is not automatically generated." >&2 - if [ -z "$force" ]; then - echo "Use \"update-modules force\" to force (re)generation." - exit 1 - else - echo "force specified, (re)generating file anyway." - fi - fi - fi -} - -createfile() { - cat < "$1" -$HEADER" -# -# Please do not edit this file directly. If you want to change or add -# anything please take a look at the files in /etc/modutils, /etc/modules-load.d -# and read the manpage for update-modules. -# -EOF -} - -addfile() { - local src="$1" - local tgt="$2" - - echo "### update-modules: start processing $src" >> "$tgt" - if [ -x "$src" ]; then - if ! "$src" >> "$tgt" ; then - echo "Error while executing $src, aborting" >&2 - exit 1 - fi - else - cat "$src" >> "$tgt" - fi - cat <> "$tgt" - -### update-modules: end processing $cfg - -EOF -} - - -checkoverwrite "$MODCONFFILE" - -if [ 0 -ne "`id -u`" ]; then - echo "You have to be root to do this." >&2 - exit 2 -fi - -model=`archmodel` -oldmodel=$model - -while [ ! -f "${ARCHDIR}/${model}" ]; do - oldmodel=$model - model=`echo $oldmodel | sed -e 's/\.[^.]\+//'` - if [ "$model" = "$oldmodel" ]; then - break - fi - echo "Configuration for $oldmodel not found, trying $model" -done - -CONF="${ARCHDIR}/${model}" - -if [ ! -f "$CONF" ]; then - ## echo "Architecture-specific modutils configuration not found, using defaults" - CONF="${ARCHDIR}/generic" -fi - -[ -e "$MODCONFFILE" ] && cp -f "$MODCONFFILE" "${MODCONFFILE}.old" - -createfile "$MODCONFTMPFILE" -createfile "$MODULESTMPFILE" - -# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway.. -for cfg in /etc/modutils/* $CONF ; do - if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs - if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then - true - elif echo $cfg | grep -q '\.conf$' ; then - addfile "$cfg" "$MODCONFTMPFILE" - else - echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf" - addfile "$cfg" "$MODULESTMPFILE" - fi - fi -done -for cfg in /etc/modules-load.d/*.conf; do - if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries - if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then - true - else - addfile "$cfg" "$MODULESTMPFILE" - fi - fi -done - -first_time=0 -if [ ! -f $MODULESFILE ]; then - first_time=1 -fi - -mv "$MODCONFTMPFILE" "$MODCONFFILE" -mv "$MODULESTMPFILE" "$MODULESFILE" - -# Don't run modutils.sh if systemd is installed -if [ $first_time -eq 1 ] && [ ! -e /bin/systemctl ]; then - /etc/init.d/modutils.sh || true -fi - -# We also call depmod here to stop insmod from complaining that modules.conf -# is more recent then modules.dep -# -if [ -d "`depdir`" -a -f /proc/modules ] -then - depmod -A || true -fi - -exit 0 - -- cgit v1.2.3-54-g00ecf