X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/be44087bf603e595c684d83c727e6441c7b7f39a..c58ad4fb6f2c4c350a6aae01b100ebb4564ad8e9:/bin/weather-init?ds=sidebyside diff --git a/bin/weather-init b/bin/weather-init deleted file mode 100755 index d009c67..0000000 --- a/bin/weather-init +++ /dev/null @@ -1,33 +0,0 @@ -# Put your custom commands here that should be executed once -# the system init finished. By default this file does nothing. - -I2C_BUS=0 -DS3221=68 - -echo heartbeat > /sys/class/leds/linkit-smart-7688:orange\:wifi/trigger - -if [ ! -e /dev/lcdi2c ]; then - insmod lcdi2c busno=0 address=0x27 cursor=0 blink=0 topo=1 -fi - -echo 1 > /sys/class/alphalcd/lcdi2c/clear -echo \00\00 > /sys/class/alphalcd/lcdi2c/position - -if [ ! -e /dev/rtc0 ]; then - - modprobe rtc-ds1307 - echo ds1307 0x$DS3221 > /sys/class/i2c-dev/i2c-$I2C_BUS/device/new_device - sleep 1 - if [ -e /dev/rtc0 ]; then - ln -sf /dev/rtc0 /dev/rtc - logger -t hardware RTC initialized - fi - -fi - -if [ -e /dev/rtc0 ]; then - /sbin/hwclock -u --rtc=/dev/rtc0 --hctosys - echo "Hardware RTC OK" > /dev/lcdi2c -else - echo "Hardware RTC FAIL" > /dev/lcdi2c -fi