Skip to content

Commit

Permalink
Merge pull request #191 from grml/old-hooks
Browse files Browse the repository at this point in the history
scripts: remove obsolete code
  • Loading branch information
zeha authored Nov 26, 2024
2 parents f97a1a2 + b373401 commit 5c8f190
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 73 deletions.
1 change: 1 addition & 0 deletions debian/grml-live.maintscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ rm_conffile /etc/grml/fai/config/files/etc/inittab/GRML_SMALL 0.43.0~
rm_conffile /etc/grml/fai/config/files/etc/lsb-base-logging.sh/GRMLBASE 0.42.3~
rm_conffile /etc/grml/fai/config/files/etc/systemd/system/[email protected]/override.conf/GRMLBASE 0.33.2~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/36-cpufrequtils 0.33.0~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/37-portmap 0.49.2~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/40-deborphan 0.35.0~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/93-update-usbids 0.45.0~
rm_conffile /etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_SID 0.47.10~
29 changes: 0 additions & 29 deletions etc/grml/fai/config/scripts/GRMLBASE/37-portmap

This file was deleted.

5 changes: 0 additions & 5 deletions etc/grml/fai/config/scripts/GRMLBASE/39-modprobe
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
set -u
set -e

# Make sure all modprobe configuration files use .conf as filename suffix.
# See http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=module-init-tools;dist=unstable
# and http://blog.bofh.it/debian/id_236
find $target/etc/modprobe.d -maxdepth 1 -type f ! -name \*\.conf -exec mv {} {}.conf \;

# Install all present modprobe.d configuration files
fcopy -v -i -r /etc/modprobe.d

Expand Down
5 changes: 0 additions & 5 deletions etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ if $ROOTCMD update-alternatives --list x-cursor-theme 2>/dev/null | grep -q '/wh
$ROOTCMD update-alternatives --set x-cursor-theme /etc/X11/cursors/whiteglass.theme
fi

if $ROOTCMD update-alternatives --list x-www-browser 2>/dev/null | grep -q '/iceweasel' ; then
echo "Setting iceweasel as x-www-browser using update-alternatives."
$ROOTCMD update-alternatives --set x-www-browser /usr/bin/iceweasel
fi

if $ROOTCMD update-alternatives --list x-www-browser 2>/dev/null | grep -q '/firefox-esr' ; then
echo "Setting firefox-esr as x-www-browser using update-alternatives."
$ROOTCMD update-alternatives --set x-www-browser /usr/bin/firefox-esr
Expand Down
10 changes: 2 additions & 8 deletions etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,15 @@ bailout() {
}


[ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT=""

if ! [ -x "${target}/usr/sbin/update-pciids" ] && ! [ -x "${target}/usr/bin/update-pciids" ] ; then
echo "Warning: update-pciids not installed (neither /usr/sbin/update-pciids nor /usr/bin/update-pciids exists"
exit 0
fi

echo "Updating PCI-IDs"
if [ -n "$TIMEOUT" ] ; then
$ROOTCMD timeout $TIMEOUT update-pciids
bailout $?
else
$ROOTCMD update-pciids
bailout $?
fi
$ROOTCMD timeout 10 update-pciids
bailout $?

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
11 changes: 2 additions & 9 deletions etc/grml/fai/config/scripts/GRMLBASE/92-update-freshclam
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,14 @@ bailout() {
exit "${1:-0}"
}

[ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT=""

if ! [ -x $target/usr/bin/freshclam ] ; then
echo "freshclam not installed"
exit 0
fi

echo "Updating clamav database via running freshclam"
if [ -n "$TIMEOUT" ] ; then
$ROOTCMD timeout $TIMEOUT /usr/bin/freshclam
bailout $?
else
$ROOTCMD /usr/bin/freshclam
bailout $?
fi
$ROOTCMD timeout 10 /usr/bin/freshclam
bailout $?

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
12 changes: 2 additions & 10 deletions etc/grml/fai/config/scripts/GRMLBASE/94-update-smart-drivedb
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,14 @@ fi
set -u
set -e

[ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT=""

if ! [ -x ${target}/usr/sbin/update-smart-drivedb ] ; then
echo "NOTE: update-smart-drivedb not present (possibly smartmontools >=6.4+svn4214-1 present)"
exit 0
fi

echo "Updating smartmontool drivedb"
if [ -n "$TIMEOUT" ] ; then
if ! $ROOTCMD timeout $TIMEOUT update-smart-drivedb ; then
echo "Warning: failed to update smartmontool drivedb, ignoring failure"
fi
else
if ! $ROOTCMD update-smart-drivedb ; then
echo "Warning: failed to update smartmontool drivedb, ignoring failure"
fi
if ! $ROOTCMD timeout 10 update-smart-drivedb ; then
echo "Warning: failed to update smartmontool drivedb, ignoring failure"
fi

## END OF FILE #################################################################
Expand Down
7 changes: 0 additions & 7 deletions etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,6 @@ zero ${target}/var/account/pacct \
${target}/var/log \
${target}/var/mail/grml

# on /run we don't have to create it
if [ -d ${target}/var/run ] ; then
echo "Recreate empty utmp and wtmp"
:>${target}/var/run/utmp
:>${target}/var/run/wtmp
fi

if ! [ -x $target/usr/sbin/update-ca-certificates ] ; then
echo "Warning: update-ca-certificates not installed"
else
Expand Down

0 comments on commit 5c8f190

Please sign in to comment.