Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
#!/bin/sh -e
# Hack to get the dpkg process' PID despite using debconf
if [ -z "$PARENT_PID" ]; then
export PARENT_PID=$PPID
fi
. /usr/share/debconf/confmodule
supported_kernel() {
local version
if [ "$1" ]; then
version="$1"
else
version="$(uname -r)"
fi
case "$version" in
2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
2.6.1[0-9]|2.6.1[0-9][!0-9]*) return 1 ;;
2.6.2[0-5]|2.6.2[0-5][!0-9]*) return 1 ;;
esac
return 0
}
check_installed_kernel() {
for ver in /lib/modules/*; do
ver=${ver##*/}
[ "$ver" = '*' ] && return 1
supported_kernel "$ver" && return 0
done
return 1
}
check_installing_kernel() {
for pkg in $(ps hp $PARENT_PID -o args); do
ver=$(echo $pkg | sed -nr "s/^.*linux-image-(2\.6\.[0-9]+)-([0-9]+|trunk)-.*_.*_.*\.deb$/\1/p")
[ "$ver" ] && supported_kernel "$ver" && return 0
done
return 1
}
check_kernel_version() {
# skip the check if udev is not already active
[ -d /dev/.udev/ ] || return 0
supported_kernel && return
if [ -e /etc/udev/kernel-upgrade ]; then
echo "This version of udev requires a kernel >= 2.6.26, but the upgrade was forced."
# restart udevd which was killed by the old prerm
udevd -d || true
return 0
fi
db_settitle udev/title/upgrade
if check_installed_kernel || check_installing_kernel; then
db_fset udev/reboot_needed seen false
db_input high udev/reboot_needed || true
db_go
db_stop
echo "A reboot is needed, but proceeding with the upgrade."
touch /etc/udev/kernel-upgrade
# restart udevd which was killed by the old prerm
udevd -d || true
return 0
fi
db_fset udev/new_kernel_needed seen false
db_reset udev/new_kernel_needed
db_input critical udev/new_kernel_needed || true
db_go
db_get udev/new_kernel_needed
if [ "$RET" = true ]; then
db_stop
echo "This version of udev requires a kernel >= 2.6.26, but the upgrade was forced."
touch /etc/udev/kernel-upgrade
# restart udevd which was killed by the old prerm
udevd -d || true
return 0
fi
db_stop
exit 1
}
check_kernel_features() {
# skip the check if udev is not already active
[ -d /dev/.udev/ ] || return 0
# skip the check if check_kernel_version() decided that a new kernel is
# being installed
[ -e /etc/udev/kernel-upgrade ] && return 0
local abort_install=0
if [ -e /proc/kallsyms ]; then
local needed_symbols='sys_inotify_init sys_signalfd'
local missing_symbol=0
for symbol in $needed_symbols; do
if ! egrep -q "^[a-fA-F0-9]+ T \.?${symbol}$" /proc/kallsyms; then
missing_symbol=1
abort_install=1
break
fi
done
fi
local sysfs_deprecated=0
if [ -d /sys/class/mem/null -a ! -L /sys/class/mem/null ]; then
sysfs_deprecated=1
fi
if [ "$missing_symbol" -eq 1 ]; then
cat < $file.tmp
mv $file.tmp $file
}
check_version() {
# $2 is non-empty when installing from the "config-files" state
[ "$2" ] || return 0
if dpkg --compare-versions $2 lt 157-1; then
if dpkg --compare-versions $2 lt 150-1; then
# these must be checked first to allow aborting before changing anything
check_kernel_version
check_kernel_features
if dpkg --compare-versions $2 lt 0.140-1; then
if dpkg --compare-versions $2 lt 0.124-1; then
# this must be checked first to allow aborting before changing anything
check_devfs_names
if dpkg --compare-versions $2 lt 0.098-1; then
echo 'Upgrading udev from packages older than 0.098-1 is not supported.'
echo 'Please purge the package and then reinstall it.'
exit 1
fi
# lt 0.124-1
rm_conffile /etc/udev/cd-aliases-generator.rules
rm_conffile /etc/udev/compat-full.rules
rm_conffile /etc/udev/compat.rules
rm_conffile /etc/udev/devfs.rules
rm_conffile /etc/udev/hotplug.rules
rm_conffile /etc/udev/permissions.rules
rm_conffile /etc/udev/persistent-input.rules
rm_conffile /etc/udev/persistent-net-generator.rules
rm_conffile /etc/udev/persistent.rules
rm_conffile /etc/udev/run.rules
rm_conffile /etc/udev/udev.rules
# removed in 0.113-1
rm_conffile /etc/udev/hotplugd.rules
(
cd /etc/udev/rules.d/
# delete dangling symlinks
find -L . -type l -print0 | xargs --no-run-if-empty --null rm
# rename the generated files
if [ -e z25_persistent-cd.rules -a ! -e 70-persistent-cd.rules ]; then
mv z25_persistent-cd.rules 70-persistent-cd.rules
fi
if [ -e z25_persistent-net.rules -a ! -e 70-persistent-net.rules ]; then
mv z25_persistent-net.rules 70-persistent-net.rules
fi
)
fi # 0.124-1
# lt 0.140-1
rm_conffile /etc/modprobe.d/display_class
rm_conffile /etc/modprobe.d/pnp-hotplug
mv_conffile /etc/modprobe.d/blacklist /etc/modprobe.d/blacklist.conf
for file in 50-udev 60-persistent-input 60-persistent-storage \
60-persistent-storage-tape 60-persistent-v4l 91-permissions 80-drivers \
75-cd-aliases-generator 75-persistent-net-generator 95-late; do
rm_conffile /etc/udev/rules.d/$file.rules
done
# SYSFS is equivalent to ATTRS, and multiple ATTRS attributes do not match
# when the keys are from different kobjects like in this case.
replace_sysfs_attr /etc/udev/rules.d/70-persistent-net.rules
fi # 0.140-1
# lt 146-1
rm_conffile /etc/scsi_id.config
fi # 146-1
# suppress errors when the new rules files contain options not supported by
# the old daemon
udevadm control --log-priority=0 || true
fi # 157-1
}
case "$1" in
install)
check_version "$@"
;;
upgrade|abort-upgrade)
check_version "$@"
;;
*)
echo "$0 called with unknown argument '$1'" >&2
exit 1
;;
esac