Ajout des travaux effectuer

This commit is contained in:
2024-12-09 11:53:11 +01:00
parent 05fac8d3ae
commit c4e97e13da
558 changed files with 67900 additions and 0 deletions

100
23SCR/SCR09/SCR9.txt Normal file
View File

@@ -0,0 +1,100 @@
I/
1)find . -type d -name "*.install" -print -----> /lib/krb5/plugins/custom.install
2)find . -type f -name "*.d" ----> ./lib/auth/transm.d
3)find . -type d -empty ---------> (./lib/krb5/plugins/custom.install) & (./lib/kernel/config)
4)find . -type f -size -1000c ---> (./lib/auth/transm.d)&(./lib/krb5/synch/settings.sh)&(./lib/krb5/synch/atom.install)&(./lib/kernel/install.d/50-mkinitcpio.install)&(./lib/kernel/install.d/50-depmod.install)
5)find . -type f -size +30000c --> (./lib/krb5/plugins/kdb/db2.so)&(./lib/krb5/plugins/preauth/pkinit.so)
6)find . -type f -size 1024c ----> ./lib/krb5/plugins/play.in
7)find . -type f -size 2b -------> (./lib/krb5/plugins/play.in)&(./lib/krb5/synch/settings.sh)
8)find . -type f -size +30b -----> (./lib/krb5/plugins/preauth/pkinit.so)&(./lib/krb5/plugins/preauth/otp.so)&(./lib/krb5/plugins/kdb/db2.so)
9)find . -type f -size -3b ------> (./lib/kernel/install.d/50-depmod.install)&(./lib/kernel/install.d/50-mkinitcpio.install)&(./lib/krb5/plugins/play.in)&(./lib/krb5/synch/atom.install)&(./lib/krb5/synch/settings.sh)&(./lib/auth/transm.d)
10)find . -type f -size +1b -size -4b ---------> (./lib/krb5/plugins/inout.dev)&(./lib/krb5/plugins/play.in)&(./lib/krb5/synch/settings.sh)
11)find . -newer "lib/krb5/synch/atom.install" --> (./lib/krb5/plugins)&(./lib/krb5/plugins/inout.dev)&(./lib/krb5/plugins/play.in)&(./lib/krb5/synch)&(./lib/krb5/synch/settings.sh)
12)find . -mtime -4 -wholename "lib/krb5/synch/"
13)find . -mtime +3 -wholename "lib/kernel/install.d" -----> (.)&(./lib)&(lib/kernel/install.d)&(./lib/kernel/install.d)&(./lib/kernel/install.d/50-depmod.install)&(./lib/kernel/install.d/90-loaderentry.install)&(./lib/kernel/install.d/50-mkinitcpio.install)&(./lib/kernel/config)&(./lib/krb5)&(./lib/krb5/plugins)&(./lib/krb5/plugins/inout.dev)&(./lib/krb5/plugins/preauth)&(./lib/krb5/plugins/preauth/pkinit.so)&(./lib/krb5/plugins/preauth/otp.so)&(./lib/krb5/plugins/custom.install)&(./lib/krb5/plugins/kdb)&(./lib/krb5/plugins/kdb/kldap.so)&(./lib/krb5/plugins/kdb/db2.so)&(./lib/krb5/plugins/play.in)&(./lib/krb5/synch)&(./lib/krb5/synch/atom.install)&(./lib/krb5/synch/settings.sh)&(./lib/auth)&(./lib/auth/transm.d)&(lib/kernel/install.d/50-depmod.install)&(lib/kernel/install.d/90-loaderentry.install)&(lib/kernel/install.d/50-mkinitcpio.install)
14)find . -mtime 3 -atime 2
15)find . -type d -perm /040 -or -perm /040
16)find . -type d -perm /444 ------------------>
.
./lib
./lib/kernel
./lib/kernel/install.d
./lib/kernel/config
./lib/kernel/config/AA
./lib/kernel/config/AA/BB
./lib/kernel/config/AA/BB/DD
./lib/kernel/config/AA/BB/DD/YY
./lib/kernel/config/AA/BB/CC
./lib/kernel/config/AA/BB/CC/XX
./lib/auth
./lib/krb5
./lib/krb5/plugins
./lib/krb5/plugins/kdb
./lib/krb5/plugins/custom.install
./lib/krb5/plugins/preauth
./lib/krb5/synch
17)find . -type f -perm 644 ------------------>(./lib/krb5/plugins/inout.dev)&(./lib/krb5/plugins/preauth/pkinit.so)&(./lib/krb5/plugins/preauth/otp.so)&(./lib/krb5/plugins/kdb/kldap.so)&(./lib/krb5/plugins/kdb/db2.so)&(./lib/krb5/plugins/play.in)&(./lib/krb5/synch/atom.install)&(./lib/krb5/synch/settings.sh)&(./lib/auth/transm.d)
II/
1)find . -maxdepth 4 -type f -name "[[:digit:]]*"
find . -maxdepth 4 -type f -name "[[:digit:]]*" -exec cp '{}' lib/kernel/config/AA/BB/CC \; -exec cp '{}' lib/kernel/config/AA/BB/CC/XX \; -exec cp '{}' lib/kernel/config/AA/BB/DD/ \; -exec cp '{}' lib/kernel/config/AA/BB/DD/YY \;
2)find . -atime -30
3)find . -mindepth 6 -type d -name "[[:upper:]]*" -exec chmod 700 {} \;
4)find . -cmin -15 ------->
.
./lib
./lib/kernel
./lib/kernel/install.d
./lib/kernel/install.d/50-depmod.install
./lib/kernel/install.d/90-loaderentry.install
./lib/kernel/install.d/50-mkinitcpio.install
./lib/kernel/config
./lib/kernel/config/AA
./lib/kernel/config/AA/BB
./lib/kernel/config/AA/BB/DD
./lib/kernel/config/AA/BB/DD/YY
./lib/kernel/config/AA/BB/CC
./lib/kernel/config/AA/BB/CC/XX
./lib/auth
./lib/auth/transm.d
./lib/krb5
./lib/krb5/plugins
./lib/krb5/plugins/play.in
./lib/krb5/plugins/kdb
./lib/krb5/plugins/kdb/db2.so
./lib/krb5/plugins/kdb/kldap.so
./lib/krb5/plugins/custom.install
./lib/krb5/plugins/inout.dev
./lib/krb5/plugins/preauth
./lib/krb5/plugins/preauth/otp.so
./lib/krb5/plugins/preauth/pkinit.so
./lib/krb5/synch
./lib/krb5/synch/atom.install
./lib/krb5/synch/settings.sh
III/cp -r TREE TRee
1)find / -type f -name "*.h" -print -quit 2> /dev/null =======> /export/documents/documentations/kernel/linux-3.1/init/do_mounts.h
2)find ~ -newer ../TRee/lib/auth/transm.d -printf "%p--%c\n"

View File

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
add)
mkinitcpio -k "$2" -g "$3"/initrd
;;
remove)
rm -f -- "$3"/initrd
;;
esac
# vim: set ft=sh ts=4 sw=4 et:

View File

@@ -0,0 +1,89 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id
fi
if ! [[ $MACHINE_ID ]]; then
exit 1
fi
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
LOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
if [[ $COMMAND == remove ]]; then
exec rm -f "$LOADER_ENTRY"
fi
if ! [[ $COMMAND == add ]]; then
exit 1
fi
if ! [[ $KERNEL_IMAGE ]]; then
exit 1
fi
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
if ! [[ $PRETTY_NAME ]]; then
PRETTY_NAME="Linux $KERNEL_VERSION"
fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
readarray -t line < /proc/cmdline
for i in ${line[*]}; do
if [[ "${i#initrd=*}" == "$i" ]]; then
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
fi
done
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
echo "Could not determine the kernel command line parameters." >&2
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
exit 1
fi
cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
chown root:root "$BOOT_DIR_ABS/linux" &&
chmod 0644 "$BOOT_DIR_ABS/linux" || {
echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
exit 1
}
mkdir -p "${LOADER_ENTRY%/*}" || {
echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
exit 1
}
{
echo "title $PRETTY_NAME"
echo "version $KERNEL_VERSION"
echo "machine-id $MACHINE_ID"
echo "options ${BOOT_OPTIONS[*]}"
echo "linux $BOOT_DIR/linux"
[[ -f $BOOT_DIR_ABS/initrd ]] && \
echo "initrd $BOOT_DIR/initrd"
:
} > "$LOADER_ENTRY" || {
echo "Could not create loader entry '$LOADER_ENTRY'." >&2
exit 1
}
exit 0

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
exec depmod -a "$2"