1 Star 1 Fork 2

sharkor/catdrive-syno

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install.sh 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
sharkor 提交于 2020-03-21 14:32 . update install.sh.
#!/bin/bash
function on_error_exit() {
if [ $? -ne 0 ];
then
send_msg $@
exit
fi
}
function send_msg() {
msg=""
for p in $@
do
msg=$msg$p" "
done
echo $msg
}
function download_file() {
filename=$1
send_msg "downloading ${filename}"
curl -o ${filename} ${down_url}${filename}
on_error_exit "download ${filename} failed"
}
function quit() {
exit 1
}
function install() {
cd /tmp/
send_msg "downloading full.bin"
wget -N --no-check-certificate -O full.bin https://gitee.com/sharkor/catdrive-syno/raw/master/full.bin
on_error_exit "download full.bin failed"
send_msg "start writing mdt0"
dd if="full.bin" of=/dev/mtdblock0 bs=1 skip=0 count=$((0xc8000))
on_error_exit "write mtd0 failed"
send_msg "start writing mdt1"
dd if="full.bin" of=/dev/mtdblock1 bs=1 skip=$((0x000c8000)) count=$((0x00004000))
on_error_exit "write mtd1 failed"
send_msg "start writing mdt2"
dd if="full.bin" of=/dev/mtdblock2 bs=1 skip=$((0x000cc000)) count=$((0x00434000))
on_error_exit "write mtd2 failed"
send_msg "start writing mdt3"
dd if="full.bin" of=/dev/mtdblock3 bs=1 skip=$((0x00500000)) count=$((0x00300000))
on_error_exit "write mtd3 failed"
send_msg '安装成功,猫盘已自动重启!'
send_msg '请访问http://find.synology.com/搜索您的群辉'
reboot
quit
}
install
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sharkor/catdrive-syno.git
git@gitee.com:sharkor/catdrive-syno.git
sharkor
catdrive-syno
catdrive-syno
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385