diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /package/base-files/files/etc/uci-defaults/.svn/text-base/11_migrate-sysctl.svn-base | |
download | trunk-36060-master.tar.gz trunk-36060-master.tar.bz2 trunk-36060-master.zip |
Diffstat (limited to 'package/base-files/files/etc/uci-defaults/.svn/text-base/11_migrate-sysctl.svn-base')
-rw-r--r-- | package/base-files/files/etc/uci-defaults/.svn/text-base/11_migrate-sysctl.svn-base | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/package/base-files/files/etc/uci-defaults/.svn/text-base/11_migrate-sysctl.svn-base b/package/base-files/files/etc/uci-defaults/.svn/text-base/11_migrate-sysctl.svn-base new file mode 100644 index 0000000..b3796a4 --- /dev/null +++ b/package/base-files/files/etc/uci-defaults/.svn/text-base/11_migrate-sysctl.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ ! -f "/rom/etc/sysctl.conf" ] || cmp -s "/rom/etc/sysctl.conf" "/etc/sysctl.conf"; then + exit 0 +fi + +fingerprint="$(md5sum /etc/sysctl.conf)" +fingerprint="${fingerprint%% *}" + +if [ "$fingerprint" = "1b05ebb41f72cb84e5510573cd4aca26" ] || \ + [ "$fingerprint" = "62deb895be1a7f496040187b7c930e4e" ]; then + logger -t migrate-sysctl "Updating sysctl.conf to use current defaults" + cp "/rom/etc/sysctl.conf" "/etc/sysctl.conf" +fi + +exit 0 + |