Skip to content

Commit

Permalink
Fix bug in 98-rpi.conf
Browse files Browse the repository at this point in the history
Remove pre-jessie sysctl tweaks

Improve I2C subsystem module loading
https://www.raspberrypi.org/forums/viewtopic.php?p=1037943#p1037943

Change package architecture from any to all
  • Loading branch information
XECDesign committed Sep 16, 2016
1 parent 502dce4 commit 6f5d2c6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 3 deletions.
10 changes: 10 additions & 0 deletions debian/changelog
@@ -1,3 +1,13 @@
raspberrypi-sys-mods (20160916) jessie; urgency=medium

* Fix bug in 98-rpi.conf
* Remove pre-jessie sysctl tweaks
* Improve I2C subsystem module loading
- (https://www.raspberrypi.org/forums/viewtopic.php?p=1037943#p1037943)
* Change package architecture from any to all

-- Serge Schneider <serge@raspberrypi.org> Fri, 16 Sep 2016 23:40:45 +1000

raspberrypi-sys-mods (20160915) jessie; urgency=medium

* Add /etc/sysctl.d/98-rpi.conf
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -9,7 +9,7 @@ Vcs-Git: git://git@github.com:RPi-Distro/raspberrypi-sys-mods.git
Vcs-Browser: https://github.com/RPi-Distro/raspberrypi-sys-mods

Package: raspberrypi-sys-mods
Architecture: any
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, libcap2-bin
Description: System tweaks for the Raspberry Pi
Various modifications to improve the performance or user experience.
2 changes: 2 additions & 0 deletions debian/raspberrypi-sys-mods.install
@@ -1 +1,3 @@
etc
lib
usr
4 changes: 4 additions & 0 deletions debian/raspberrypi-sys-mods.postinst
Expand Up @@ -39,6 +39,10 @@ case "${1}" in
echo "Adjusting cmdline.txt..."
sed -e "s|=ttyAMA0|=serial0|;s|=ttyS0|=serial1|;" -i /boot/cmdline.txt || echo "Failed"
fi
if dpkg --compare-versions "${2}" lt-nl "20160916"; then
echo "Removing old sysctl tweaks if present..."
sed -n '1h;1!H;${;g;s/\n\# rpi tweaks\nvm\.swappiness=1\nvm\.min_free_kbytes = 8192//g;p;}' -i /etc/sysctl.d/99-sysctl.conf
fi
;;

abort-upgrade|abort-remove|abort-deconfigure)
Expand Down
2 changes: 1 addition & 1 deletion debian/raspberrypi-sys-mods.preinst
Expand Up @@ -7,7 +7,7 @@ case "${1}" in
echo "Removing old /etc/sysctl.d/98-rpi.conf..."
rm -f /etc/sysctl.d/98-rpi.conf
echo "Adjusting vm.swappiness and vm.min_free_kbytes..."
echo 60 > /proc/sys/vm/swappiness
echo 60 > /proc/sys/vm/swappiness
echo 16384 > /proc/sys/vm/min_free_kbytes
else
echo "Detected modified /etc/sysctl.d/98-rpi.conf. Leaving unchanged."
Expand Down
2 changes: 1 addition & 1 deletion etc/sysctl.d/98-rpi.conf
@@ -1,2 +1,2 @@
kernel.printk = 3 4 1 3
echo 16384 > /proc/sys/vm/min_free_kbytes
vm.min_free_kbytes = 16384
1 change: 1 addition & 0 deletions lib/udev/rules.d/10-i2c-modprobe.rules
@@ -0,0 +1 @@
SUBSYSTEM=="i2c", ENV{MODALIAS}=="?*", ENV{OF_NAME}=="?*", ENV{OF_COMPATIBLE_0}=="?*", RUN+="/usr/lib/raspberrypi-sys-mods/i2cprobe"
2 changes: 2 additions & 0 deletions usr/lib/raspberrypi-sys-mods/i2cprobe
@@ -0,0 +1,2 @@
#!/bin/sh
modprobe ${MODALIAS} || modprobe "of:N${OF_NAME}T<NULL>C${OF_COMPATIBLE_0}"

0 comments on commit 6f5d2c6

Please sign in to comment.