+++ /dev/null
-#!/bin/sh
-tmp=/tmp/kernel-deinstall
-cat > $tmp <<EOF
-This program will remove the enhanced power-user Linux kernel
-and restore the original Nokia kernel.
-The settings will be kept but will have no effect.
-Warning: This deinstallation method is currently experimental and could lead to a bricked device.
-For a safe but manual deinstallation method please visit http://wiki.maemo.org/Kernel_Power
-
-For the deinstallation please make sure that you are connected to
-the Internet and that Application Manager is not running.
-
-If you want keep the enhanced kernel, cancel the installation now
-by tapping the blurred area above this dialog.
-Otherwise confirm the dialog to proceed with the deinstallation.
-
-After the installation, you need to unplug the USB cable,
-completely shutdown your device, and boot again to activate the original Nokia kernel.
-EOF
-maemo-confirm-text "Kernel-Power Flasher" $tmp
-res=$?
-rm -f $tmp
-dbus="run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications"
-dbusmsg () { $dbus org.freedesktop.Notifications.SystemNoteInfoprint string:"$1"; }
-dbusbox () { $dbus org.freedesktop.Notifications.SystemNoteDialog string:"$1" uint32:0 string:OK; }
-
-if test "$res" != 0; then
- dbusmsg "User has cancelled the deinstallation. No changes were made."
- exit 1
-fi
-
-if pgrep -f /usr/bin/hildon-application-manager > /dev/null; then
- dbusbox "Error: Application Manager is running. Please close it before deinstallation."
- exit 1
-fi
-if pgrep -f apt-worker > /dev/null; then
- dbusbox "Error: apt is running. Please wait and try again later."
- exit 1
-fi
-
-dbusmsg "Please wait while restoring Nokia kernel..."
-
-apt-get install --reinstall -y kernel kernel-flasher > $tmp
-ok=$?
-cat $tmp
-if grep -qE "(Could not resolve host|cannot be downloaded)" $tmp; then
- dbusbox "Error during deinstallation: Could not download Nokia kernel. Please make sure the internet connection is working."
- rm $tmp
- exit 1
-fi
-if test $ok = 0 && grep -q "Image flashed successfully" $tmp; then :
-else
- dbusbox "Error during deinstallation: Could not install Nokia kernel."
- rm $tmp
- exit 1
-fi
-dbusmsg "Nokia kernel was restored. Removing enhanced kernel packages..."
-apt-get remove -y kernel-power kernel-power-modules > $tmp
-ok=$?
-cat $tmp
-if test $ok = 0; then
- dbusbox "Kernel sucessfully deinstalled. Nokia kernel was restored."
-else
- dbusbox "Warning: Nokia kernel was restored but could not remove enhanced kernel."
-fi
-rm $tmp
-exit $ok
+++ /dev/null
-[Desktop Entry]
-Version=0.1
-Type=Application
-Name=Deinstall Kernel-Power
-Exec=sudo /usr/sbin/kernel-power-deinstall
-X-Osso-Type=application/x-executable
-Terminal=false
test "$1" = install || exit 0 # upgrades are fine
f=/tmp/kernel-power-msg
cat > $f <<EOF
-This package will install an enhanced Linux kernel,
+This will install Linux kernel for power user,
with many additional features and bugfixes.
By default, all extra features are disabled
but they can be enabled by the user during runtime.
by tapping the blurred area above this dialog.
After the installation, you need to unplug the USB cable,
-completely shutdown your device, and boot again to activate the kernel.
+completely shutdown your device, and start it again.
EOF
-maemo-confirm-text "Kernel-Power Flasher" $f
+maemo-confirm-text "Linux kernel for power user" $f
res=$?
rm -f $f
exit $res
dbusmsg="run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint"
if pgrep -f /usr/bin/hildon-application-manager > /dev/null; then
- $dbusmsg string:"This package can only be deinstalled with the application 'Deinstall Kernel-Power'."
+ $dbusmsg string:"This package can be uninstalled only via \"Nokia Kernel\" menu entry."
exit 1
fi
-user ALL = NOPASSWD: /usr/sbin/kernel-power-deinstall
+user ALL = NOPASSWD: /usr/sbin/kernel-power-uninstall
set -e
cd /lib/modules
-
-rm -f /lib/modules/current
ls -1d * | grep -v current | while read i; do
/sbin/depmod $i || :
done
+
+rm -f /lib/modules/current
ln -s @KVER@ /lib/modules/current
if grep -q "MODULE_PATH=/lib/modules/current" /sbin/preinit; then
- sed 's%MODULE_PATH=/lib/modules/current%MODULE_PATH=/lib/modules/`uname -r` #fixed by kernel-power%' /sbin/preinit > /sbin/preinit.tmp && \
- chmod +x /sbin/preinit.tmp && \
- mv /sbin/preinit.tmp /sbin/preinit
+ sed 's%MODULE_PATH=/lib/modules/current%MODULE_PATH=/lib/modules/`uname -r` #fixed by kernel-power%' -i /sbin/preinit
fi
dpkg-divert --local --divert /lib/modules/2.6.28-omap1/JoikuSpot_Bouncer.ko --rename --add /usr/bin/JoikuSpot_Bouncer.ko || :
#!/bin/sh
-#set -e
+set -e
test -d /lib/modules/@KVER@ && rm -f /lib/modules/@KVER@/modules.*
rm -f /lib/modules/current
ln -s 2.6.28-omap1 /lib/modules/current
if test "$1" != upgrade && grep -q 'MODULE_PATH=/lib/modules/`uname -r`' /sbin/preinit; then
- sed 's%MODULE_PATH=/lib/modules/`uname -r` #fixed by kernel-power%MODULE_PATH=/lib/modules/current%' /sbin/preinit > /sbin/preinit.tmp && \
- chmod +x /sbin/preinit.tmp && \
- mv /sbin/preinit.tmp /sbin/preinit
+ sed 's%MODULE_PATH=/lib/modules/`uname -r` #fixed by kernel-power%MODULE_PATH=/lib/modules/current%' -i /sbin/preinit
fi
#DEBHELPER#
--- /dev/null
+#!/bin/sh
+tmp=/tmp/kernel-power-uninstall
+cat > $tmp <<EOF
+This program will restore original Nokia kernel
+and uninstall package "Linux kernel for power user".
+Warning: This method is currently experimental and
+could lead to a bricked device. For a safe but manual
+method please visit http://wiki.maemo.org/Kernel_Power
+
+This program only uninstall "Linux kernel for power user".
+Other packages can be uninstalled in Application Manager.
+
+Before uninstalling please make sure that you are connected to
+the Internet and that Application Manager is not running.
+
+If you want keep the Linux kernel for power user installed,
+cancel this by tapping the blurred area above this dialog.
+Otherwise confirm the dialog to revert back Nokia kernel.
+
+After the uninstallation, you need to unplug the USB cable,
+completely shutdown your device, and start it again.
+EOF
+maemo-confirm-text "Linux kernel for power user" $tmp
+res=$?
+rm -f $tmp
+dbus="run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications"
+dbusmsg () { $dbus org.freedesktop.Notifications.SystemNoteInfoprint string:"$1"; }
+dbusbox () { $dbus org.freedesktop.Notifications.SystemNoteDialog string:"$1" uint32:0 string:OK; }
+
+if test "$res" != 0; then
+ dbusmsg "User has cancelled uninstallation of Linux kernel for power user. No changes were made."
+ exit 1
+fi
+
+if pgrep -f /usr/bin/hildon-application-manager > /dev/null; then
+ dbusbox "Error: Application Manager is running. Please close it before uninstallation."
+ exit 1
+fi
+if pgrep -f apt-worker > /dev/null || pgrep -f apt-get; then
+ dbusbox "Error: apt is running. Please wait and try again later."
+ exit 1
+fi
+
+dbusmsg "Please wait while Nokia kernel will be restored..."
+
+apt-get install --reinstall -y kernel kernel-flasher > $tmp
+ok=$?
+cat $tmp
+if grep -qE "(Could not resolve host|cannot be downloaded)" $tmp; then
+ dbusbox "Error during uninstallation: Could not download Nokia kernel. Please make sure the internet connection is working."
+ rm $tmp
+ exit 1
+fi
+if test $ok = 0 && grep -q "Image flashed successfully" $tmp; then :
+else
+ dbusbox "Error during uninstallation: Could not install Nokia kernel."
+ rm $tmp
+ exit 1
+fi
+dbusmsg "Nokia kernel was restored. Removing package \"Linux kernel for power user\"..."
+apt-get remove --auto-remove -y kernel-power-flasher > $tmp
+ok=$?
+cat $tmp
+if test $ok = 0; then
+ dbusbox "Linux kernel for power user was sucessfully uninstalled. Nokia kernel was restored."
+else
+ dbusbox "Warning: Nokia kernel was restored but removing package \"Linux kernel for power user\" failed."
+fi
+rm $tmp
+exit $ok
--- /dev/null
+[Desktop Entry]
+Version=0.1
+Type=Application
+Name=Nokia Kernel
+Exec=sudo /usr/sbin/kernel-power-uninstall
+X-Osso-Type=application/x-executable
+Terminal=false