[OpenWrt-Devel] [PATCH] Fix regular expression in sysupgrade

Преподобный Гомер mk.43.ecko at gmail.com
Mon Aug 22 04:17:12 EDT 2016


ping? Can somebody review this patch?
--
Regards,
R.H.


2016-08-19 18:47 GMT+03:00 Преподобный Гомер <mk.43.ecko at gmail.com>:
> Previous regular expression in sed allowed strings that starts with space.
>
> $ cat sysupgrade.conf
> ## This file contains files and directories that should
> ## be preserved during an upgrade.
>
> # /etc/example.conf
>  # /etc/openvpn/
> /etc/config
> /etc/profile
> /etc/firewall.user
> /etc/TC_hfsc.sh
> /etc/hotplug.d/iface/30-trafficc
> /etc/init.d/trafficc
> /root
> /etc/crontabs/root
> $ sed -ne '/^[[:space:]]*$/d; /^#/d; p' sysupgrade.conf
>  # /etc/openvpn/
> /etc/config
> /etc/profile
> /etc/firewall.user
> /etc/TC_hfsc.sh
> /etc/hotplug.d/iface/30-trafficc
> /etc/init.d/trafficc
> /root
> /etc/crontabs/root
>
> This patch fixes that problem
> $ sed -ne '/^[[:space:]]*\($\|#\)/d; p' sysupgrade.conf
> /etc/config
> /etc/profile
> /etc/firewall.user
> /etc/TC_hfsc.sh
> /etc/hotplug.d/iface/30-trafficc
> /etc/init.d/trafficc
> /root
> /etc/crontabs/root
>
> --
> Regards,
> R.H.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list