Commit e5fd0ab8 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Updated easycwmp to 1.8.1

parent e1f0a4a4
all: easycwmp-service device-info easycwmp-config
tar xf easycwmp-1.5.3.tar.gz
patch -Np1 -d easycwmp-1.5.3 < easycwmp-1.5.3-blank-device.patch
cd easycwmp-1.5.3 && autoreconf -i
cd easycwmp-1.5.3 && ./configure --prefix=/usr --enable-jsonc=1
$(MAKE) -C easycwmp-1.5.3
$(MAKE) -C easycwmp-1.5.3 install
tar xf EasyCwmp-1.8.1.tar.gz
patch -Np1 -d easycwmp-EasyCwmp-1.8.1 < easycwmp-1.8.1-blank_device.patch
cd easycwmp-EasyCwmp-1.8.1 && autoreconf -i
cd easycwmp-EasyCwmp-1.8.1 && ./configure --prefix=/usr --enable-jsonc=1
$(MAKE) -C easycwmp-EasyCwmp-1.8.1
$(MAKE) -C easycwmp-EasyCwmp-1.8.1 install
install -v -Dm755 -d /usr/share/easycwmp/functions
install -v -Dm755 -d /etc/easycwmp
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/easycwmp.sh /usr/sbin/easycwmp
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/defaults /usr/share/easycwmp/defaults
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/common/common /usr/share/easycwmp/functions/common
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/common/device_info /usr/share/easycwmp/functions/device_info
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/common/management_server /usr/share/easycwmp/functions/management_server
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/common/ipping_launch /usr/share/easycwmp/functions/ipping_launch
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/tr181/root /usr/share/easycwmp/functions/root
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/tr181/ip /usr/share/easycwmp/functions/ip
install -v -Dm755 easycwmp-1.5.3/ext/openwrt/scripts/functions/tr181/ipping_diagnostic /usr/share/easycwmp/functions/ipping_diagnostic
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/easycwmp.sh /usr/sbin/easycwmp
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/defaults /usr/share/easycwmp/defaults
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/common/common /usr/share/easycwmp/functions/common
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/common/device_info /usr/share/easycwmp/functions/device_info
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/common/management_server /usr/share/easycwmp/functions/management_server
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/common/ipping_launch /usr/share/easycwmp/functions/ipping_launch
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/tr181/root /usr/share/easycwmp/functions/root
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/tr181/ip /usr/share/easycwmp/functions/ip
install -v -Dm755 easycwmp-EasyCwmp-1.8.1/ext/openwrt/scripts/functions/tr181/ipping_diagnostic /usr/share/easycwmp/functions/ipping_diagnostic
install -v -Dm755 ip /usr/share/easycwmp/functions/ip
install -v -Dm755 ssh /usr/share/easycwmp/functions/ssh
install -v -Dm755 easycwmp-init-device-info /usr/sbin/easycwmp-init-device-info
......@@ -25,7 +25,7 @@ all: easycwmp-service device-info easycwmp-config
tar xf ../openwrt/openwrt.tar.xz -C /
@echo "$$EASYCWMP_SERVICE" > /lib/systemd/system/easycwmpd.service
ln -s /lib/systemd/system/easycwmpd.service /etc/systemd/system/multi-user.target.wants/easycwmpd.service
rm -rf easycwmp-1.5.3
rm -rf easycwmp-EasyCwmp-1.8.1
easycwmp-service:
define EASYCWMP_SERVICE
......
diff -uNr easycwmp-1.5.3/ext/openwrt/scripts/easycwmp.sh easycwmp-1.5.3-blank-device/ext/openwrt/scripts/easycwmp.sh
--- easycwmp-1.5.3/ext/openwrt/scripts/easycwmp.sh 2017-06-01 18:25:35.000000000 +0930
+++ easycwmp-1.5.3-blank-device/ext/openwrt/scripts/easycwmp.sh 2018-08-29 20:14:07.261196306 +0930
@@ -354,11 +354,7 @@
return
fi
if [ "$action" = "factory_reset" ]; then
- if [ "`which jffs2_mark_erase`" != "" ]; then
- jffs2_mark_erase "rootfs_data"
- else
- /sbin/jffs2mark -y
- fi
+ touch /data/.factorydefault
sync
reboot
fi
diff -uNr easycwmp-1.5.3/ext/openwrt/scripts/functions/common/device_info easycwmp-1.5.3-blank-device/ext/openwrt/scripts/functions/common/device_info
--- easycwmp-1.5.3/ext/openwrt/scripts/functions/common/device_info 2017-06-01 18:25:35.000000000 +0930
+++ easycwmp-1.5.3-blank-device/ext/openwrt/scripts/functions/common/device_info 2018-08-29 20:14:07.262196310 +0930
@@ -25,11 +25,12 @@
common_execute_method_param "$DMROOT.DeviceInfo.SerialNumber" "0" "$UCI_GET easycwmp.@device[0].serial_number" "" "" "1"
common_execute_method_param "$DMROOT.DeviceInfo.HardwareVersion" "0" "$UCI_GET easycwmp.@device[0].hardware_version" "" "" "1"
common_execute_method_param "$DMROOT.DeviceInfo.SoftwareVersion" "0" "$UCI_GET easycwmp.@device[0].software_version" "" "" "1"
- common_execute_method_param "$DMROOT.DeviceInfo.UpTime" "0" "device_info_get_uptime" "" "xsd:unsignedInt"
+ common_execute_method_param "$DMROOT.DeviceInfo.UpTime" "0" "device_info_get_uptime" "" "xsd:unsignedInt" "1"
common_execute_method_param "$DMROOT.DeviceInfo.DeviceLog" "0" "dmesg | tail -n1"
common_execute_method_obj "$DMROOT.DeviceInfo.MemoryStatus." "0"
common_execute_method_param "$DMROOT.DeviceInfo.MemoryStatus.Total" "0" "device_info_get_total_memory"
common_execute_method_param "$DMROOT.DeviceInfo.MemoryStatus.Free" "0" "device_info_get_free_memory"
+ common_execute_method_param "$DMROOT.DeviceInfo.HostName" "1" "hostname" "device_info_set_hostname" "" "1"
return 0;
;;
esac
@@ -54,6 +55,14 @@
return 0
}
+device_info_set_hostname() {
+ local val="$1"
+ hostname $val
+ echo "127.0.0.1 localhost $val" > /etc/hosts
+ echo "$val" > /etc/hostname
+ return 0
+}
+
device_info_get_uptime() {
awk -F '.' '{ print $1 }' /proc/uptime
}
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment