Skip to content
Permalink
Browse files

修改初始化配置

  • Loading branch information...
tossp committed Oct 17, 2017
1 parent 1b199fd commit 903513a315c9d202bc6c809ea0fcbc4b51df3dce
Showing with 182 additions and 8 deletions.
  1. +61 −0 .gitlab-ci.yml
  2. BIN README
  3. +19 −8 package/lean/default-settings/files/zzz-default-settings
  4. +102 −0 tsconfig
@@ -0,0 +1,61 @@
image: tossp/lede:latest

before_script:
- wget -O /etc/apt/sources.list http://mirrors.163.com/.help/sources.list.trusty
- apt-get -qqy update

stages:
- 测试阶段
- 构建阶段
- 部署阶段

构建编译:
stage: 构建阶段
retry: 2
artifacts:
name: "${CI_JOB_STAGE}_${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
expire_in: 6 mos
paths:
- bin/
script:
- apt-get -qqy install sudo bsdmainutils autoconf automake libtool
- mkdir -p /cache/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG/{dl,feeds,build_dir,staging_dir}
- chown -R lede /cache/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG
- ln -s /cache/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG/dl dl
- ln -s /cache/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG/feeds feeds
- ln -s /cache/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG/build_dir build_dir
- ln -s /cache/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG/staging_dir staging_dir
- ./scripts/feeds update -a
- ./scripts/feeds install -a
- cp tsconfig .config
- make defconfig
- chown -R lede ../
- chown -R lede $HOME
- chmod -R u+w ../
- sudo -u lede make -j1 V=1
only:
- ci

七牛发布:
stage: 部署阶段
dependencies:
- 构建编译
environment:
name: 'QN-OSS'
url: http://lede-k3.test.tossp.com
variables:
TS_QN_BUCKET: 'lede-k3'
script:
- apt-get -qqy install tree
- echo '<pre>' > bin/index.html
- echo \<pre\> > bin/index.html
- tree -L 5 bin >> bin/index.html
- echo \</pre\> >> bin/index.html
- wget -O /bin/qshell http://devtools.qiniu.com/2.1.5/qshell-linux-x64
- chmod a+x /bin/qshell
- qshell account $QNAK $QNSK
- qshell qupload2 -log-file /root/ts.log -check-exists -check-hash -check-size -overwrite -rescan-local -thread-count 6 -src-dir bin -bucket $TS_QN_BUCKET
- cat /root/ts.log
only:
- ci

BIN +884 Bytes (120%) README
Binary file not shown.
@@ -3,7 +3,7 @@
uci set luci.main.lang=zh_cn
uci commit luci

uci set system.@system[0].hostname=LEDE
uci set system.@system[0].hostname=tsk3
uci set system.@system[0].timezone=CST-8
uci set system.@system[0].zonename=Asia/Shanghai
uci commit system
@@ -28,15 +28,17 @@ sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/usb_printer.lua
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/xunlei.lua

[ ! -f /usr/bin/ip ] && ln -sf /sbin/ip /usr/bin/ip
(opkg list-installed | grep ip-full >/dev/null 2>&1) && ln -sf /usr/sbin/ip /usr/bin/ip
# opkg files ip-full -> /sbin/ip-full
(opkg list-installed | grep ip-full >/dev/null 2>&1) && ln -sf /sbin/ip-full /usr/bin/ip

rm -rf /tmp/luci-modulecache/
rm -f /tmp/luci-indexcache

sed -i 's/downloads.openwrt.org/openwrt.proxy.ustclug.org/g' /etc/opkg/distfeeds.conf
# sed -i 's/downloads.openwrt.org/openwrt.proxy.ustclug.org/g' /etc/opkg/distfeeds.conf
sed -i 's/downloads.lede-project.org/mirrors.ustc.edu.cn\/lede/g' /etc/opkg/distfeeds.conf
sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow

sed -i "s/# //g" /etc/opkg/distfeeds.conf
# sed -i "s/# //g" /etc/opkg/distfeeds.conf

sed -i '/REDIRECT --to-ports 53/d' /etc/firewall.user
echo "iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53" >> /etc/firewall.user
@@ -46,10 +48,19 @@ sed -i '/option disabled/d' /etc/config/wireless
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh
wifi up

sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
echo "DISTRIB_REVISION='R7.4.2 By Lean'" >> /etc/openwrt_release
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
echo "DISTRIB_DESCRIPTION='LEDE 17.01.3'" >> /etc/openwrt_release
# sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
# echo "DISTRIB_REVISION='R7.4.2 By Lean'" >> /etc/openwrt_release
# sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
# echo "DISTRIB_DESCRIPTION='LEDE 17.01.3'" >> /etc/openwrt_release
echo "DISTRIB_REVISION_LEAN='R7.4.2 By Lean'" >> /etc/openwrt_release
echo "DISTRIB_DESCRIPTION_LEAN='LEDE 17.01.3'" >> /etc/openwrt_release

[ -f /etc/init.d/frp ] && /etc/init.d/frp enable
[ -f /etc/init.d/frp ] && /etc/init.d/frp start
[ -f /etc/init.d/softethervpnbridge ] && /etc/init.d/softethervpnbridge disable
[ -f /etc/init.d/softethervpnbridge ] && /etc/init.d/softethervpnbridge stop
[ -f /etc/init.d/softethervpnclient ] && /etc/init.d/softethervpnclient disable
[ -f /etc/init.d/softethervpnclient ] && /etc/init.d/softethervpnclient stop

exit 0

102 tsconfig
@@ -0,0 +1,102 @@
CONFIG_TARGET_bcm53xx=y
CONFIG_TARGET_bcm53xx_DEVICE_phicomm-k3=y
CONFIG_TARGET_BOARD="bcm53xx"
CONFIG_DROPBEAR_ECC=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_MBEDTLS=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_OPENSSL_ENGINE_CRYPTO=y
CONFIG_OPENSSL_ENGINE_DIGEST=y
CONFIG_OPENSSL_WITH_COMPRESSION=y
CONFIG_OPENSSL_WITH_DTLS=y
CONFIG_OPENSSL_WITH_EC2M=y
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6rd=y
CONFIG_PACKAGE_6to4=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
CONFIG_PACKAGE_etherwake=y
CONFIG_PACKAGE_haproxy=y
CONFIG_PACKAGE_ip-full=y
# CONFIG_PACKAGE_ip-tiny is not set
CONFIG_PACKAGE_ip6tables-extra=y
CONFIG_PACKAGE_ip6tables-mod-nat=y
CONFIG_PACKAGE_iptables-mod-extra=y
CONFIG_PACKAGE_iputils-ping=y
CONFIG_PACKAGE_iputils-ping6=y
CONFIG_PACKAGE_iputils-tracepath=y
CONFIG_PACKAGE_iputils-tracepath6=y
CONFIG_PACKAGE_iputils-traceroute6=y
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-ip6tables-extra=y
CONFIG_PACKAGE_kmod-ipt-extra=y
CONFIG_PACKAGE_kmod-ipt-nat6=y
CONFIG_PACKAGE_kmod-iptunnel=y
CONFIG_PACKAGE_kmod-iptunnel4=y
CONFIG_PACKAGE_kmod-iptunnel6=y
CONFIG_PACKAGE_kmod-nf-nat6=y
CONFIG_PACKAGE_kmod-sit=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_brcmfmac-firmware-4366b1-pcie=y
# CONFIG_PACKAGE_kmod-usb-printer is not set
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libltdl=y
CONFIG_PACKAGE_libmbedtls=y
CONFIG_PACKAGE_libminiupnpc=y
CONFIG_PACKAGE_libnatpmp=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libsysfs=y
CONFIG_PACKAGE_luci-app-diag-core=y
CONFIG_PACKAGE_luci-app-mwan3=y
CONFIG_PACKAGE_luci-app-syncdial=y
CONFIG_PACKAGE_luci-app-transparent-proxy=y
# CONFIG_PACKAGE_luci-app-usb-printer is not set
CONFIG_PACKAGE_luci-app-vlmcsd=y
# CONFIG_PACKAGE_luci-app-vsftpd is not set
CONFIG_PACKAGE_luci-app-wol=y
CONFIG_PACKAGE_luci-i18n-diag-core-zh-cn=y
CONFIG_PACKAGE_luci-i18n-mwan3-zh-cn=y
CONFIG_PACKAGE_luci-i18n-vlmcsd-zh-cn=y
CONFIG_PACKAGE_luci-i18n-wol-zh-cn=y
CONFIG_PACKAGE_mwan3=y
# CONFIG_PACKAGE_p910nd is not set
CONFIG_PACKAGE_perl=y
CONFIG_PACKAGE_perlbase-base=y
CONFIG_PACKAGE_perlbase-bytes=y
CONFIG_PACKAGE_perlbase-class=y
CONFIG_PACKAGE_perlbase-config=y
CONFIG_PACKAGE_perlbase-cwd=y
CONFIG_PACKAGE_perlbase-errno=y
CONFIG_PACKAGE_perlbase-essential=y
CONFIG_PACKAGE_perlbase-fcntl=y
CONFIG_PACKAGE_perlbase-file=y
CONFIG_PACKAGE_perlbase-filehandle=y
CONFIG_PACKAGE_perlbase-i18n=y
CONFIG_PACKAGE_perlbase-integer=y
CONFIG_PACKAGE_perlbase-io=y
CONFIG_PACKAGE_perlbase-list=y
CONFIG_PACKAGE_perlbase-locale=y
CONFIG_PACKAGE_perlbase-params=y
CONFIG_PACKAGE_perlbase-posix=y
CONFIG_PACKAGE_perlbase-re=y
CONFIG_PACKAGE_perlbase-scalar=y
CONFIG_PACKAGE_perlbase-selectsaver=y
CONFIG_PACKAGE_perlbase-socket=y
CONFIG_PACKAGE_perlbase-symbol=y
CONFIG_PACKAGE_perlbase-tie=y
CONFIG_PACKAGE_perlbase-unicore=y
CONFIG_PACKAGE_perlbase-utf8=y
CONFIG_PACKAGE_perlbase-xsloader=y
CONFIG_PACKAGE_softethervpn=y
CONFIG_PACKAGE_sysfsutils=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_vlmcsd=y
# CONFIG_PACKAGE_vsftpd-alt is not set
CONFIG_PERL_NOCOMMENT=y
CONFIG_PERL_THREADS=y

0 comments on commit 903513a

Please sign in to comment.
You can’t perform that action at this time.