mirror of
https://github.com/RROrg/rr.git
synced 2025-09-01 01:17:28 +08:00
Compare commits
4 Commits
46db33e6f3
...
de93239f97
Author | SHA1 | Date | |
---|---|---|---|
|
de93239f97 | ||
|
59501a2d4a | ||
|
5ce02ba109 | ||
|
bc0d1e7b97 |
50
.github/workflows/issues.yml
vendored
50
.github/workflows/issues.yml
vendored
@ -38,6 +38,7 @@ jobs:
|
||||
warinfo = 'false'
|
||||
|
||||
format = ''
|
||||
size = ''
|
||||
language= ''
|
||||
model = ''
|
||||
version = ''
|
||||
@ -49,6 +50,7 @@ jobs:
|
||||
jsonbody = json.loads(issuebody)
|
||||
iscustom = 'true'
|
||||
format = jsonbody.get('format', '')
|
||||
size = jsonbody.get('size', '')
|
||||
language = jsonbody.get('language', '')
|
||||
model = jsonbody.get('model', '')
|
||||
version = jsonbody.get('version', '')
|
||||
@ -66,6 +68,7 @@ jobs:
|
||||
set_output("warinfo", warinfo)
|
||||
|
||||
set_output("format", format)
|
||||
set_output("size", size)
|
||||
set_output("language", language)
|
||||
set_output("model", model)
|
||||
set_output("version", version)
|
||||
@ -262,6 +265,23 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "${{ env.size }}" in
|
||||
2GB)
|
||||
echo "2GB"
|
||||
;;
|
||||
4GB)
|
||||
echo "4GB"
|
||||
sudo ./localbuild.sh resize rr/rr.img +2048M
|
||||
;;
|
||||
8GB)
|
||||
echo "8GB"
|
||||
sudo ./localbuild.sh resize rr/rr.img +6144M
|
||||
;;
|
||||
*)
|
||||
echo "unknown size"
|
||||
;;
|
||||
esac
|
||||
|
||||
ls rr -al
|
||||
|
||||
RR_VERSION_FILE="rr/ws/mnt/p1/RR_VERSION"
|
||||
@ -283,38 +303,52 @@ jobs:
|
||||
echo "Of course, you can also modify the settings yourself."
|
||||
} >README.txt
|
||||
|
||||
if [ "${{ env.format }}" = "ova" ]; then
|
||||
case "${{ env.format }}" in
|
||||
ova)
|
||||
echo "OVA"
|
||||
. scripts/func.sh "${{ secrets.RRORG }}"
|
||||
convertova "rr/rr.img" "rr/rr.ova"
|
||||
(cd rr && sha256sum rr.ova >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.ova.zip" -j rr/rr.ova ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
elif [ "${{ env.format }}" = "vmx" ]; then
|
||||
;;
|
||||
vmx)
|
||||
echo "VMX"
|
||||
. scripts/func.sh "${{ secrets.RRORG }}"
|
||||
convertvmx "rr/rr.img" "rr.vmx" # rr.vmx is a directory
|
||||
(cd rr.vmx && sha256sum * >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.vmx.zip" -r rr.vmx ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
elif [ "${{ env.format }}" = "vmdk" ]; then
|
||||
;;
|
||||
vmdk)
|
||||
echo "VMDK"
|
||||
qemu-img convert rr/rr.img -O vmdk -o 'adapter_type=lsilogic,subformat=streamOptimized,compat6' rr/rr.vmdk
|
||||
(cd rr && sha256sum rr.vmdk >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.vmdk.zip" -j rr/rr.vmdk ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
elif [ "${{ env.format }}" = "flat" ]; then
|
||||
;;
|
||||
flat)
|
||||
echo "FLAT"
|
||||
qemu-img convert rr/rr.img -O vmdk -o 'adapter_type=lsilogic,subformat=monolithicFlat,compat6' rr/rr.vmdk
|
||||
(cd rr && sha256sum rr*.vmdk >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.flat.zip" -j rr/rr*.vmdk ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
elif [ "${{ env.format }}" = "vhd" ]; then
|
||||
;;
|
||||
vhd)
|
||||
echo "VHD"
|
||||
. scripts/func.sh "${{ secrets.RRORG }}"
|
||||
qemu-img convert rr/rr.img -O vpc rr/rr.vhd
|
||||
createvmc "rr/rr.vhd" "rr/rr.vmc"
|
||||
(cd rr && sha256sum rr.vhd >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.vhd.zip" -j rr/rr.vmc rr/rr.vhd ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
elif [ "${{ env.format }}" = "vhdx" ]; then
|
||||
;;
|
||||
vhdx)
|
||||
echo "VHDX"
|
||||
qemu-img convert rr/rr.img -O vhdx -o subformat=dynamic rr/rr.vhdx
|
||||
(cd rr && sha256sum rr.vhdx >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.vhdx.zip" -j rr/rr.vhdx ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
else
|
||||
;;
|
||||
*)
|
||||
echo "IMG"
|
||||
(cd rr && sha256sum rr.img >../sha256sum)
|
||||
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.img.zip" -j rr/rr.img ${USER_CONFIG_FILE} sha256sum README.txt
|
||||
fi
|
||||
esac
|
||||
|
||||
echo "TAG=${TAG}" >> $GITHUB_ENV
|
||||
|
||||
|
@ -207,7 +207,7 @@
|
||||
let formData = new FormData(form);
|
||||
var title = "custom";
|
||||
var body = {};
|
||||
var _parameters = ["title", "format", "language", "model", "version", "kernel", "addons", "modules"];
|
||||
var _parameters = ["title", "format", "size", "language", "model", "version", "kernel", "addons", "modules"];
|
||||
for (var key in _parameters) {
|
||||
var name = _parameters[key];
|
||||
if ($("#" + name).is(":hidden")) { continue; }
|
||||
@ -301,6 +301,18 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-1 mb-2" id="size_item">
|
||||
<div class="form-group-header">
|
||||
<label class="color-fg-default text-mono f6">Size:</label>
|
||||
</div>
|
||||
<div class="form-group-body">
|
||||
<select class="form-select form-control select-sm input-contrast" id="size" name="inputs[size]" value="">
|
||||
<option value="2GB">2GB</option>
|
||||
<option selected="selected" value="4GB">4GB</option>
|
||||
<option value="8GB">8GB</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-1 mb-2" id="language_item">
|
||||
<div class="form-group-header">
|
||||
<label class="color-fg-default text-mono f6">Language:</label>
|
||||
|
Binary file not shown.
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "لا تم اختيار حاويه!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "حاويه %s حجمها اقل من 1GB و لا يمكن تنسخها!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "حاويه %s حجمها اقل من 2GB و لا يمكن تنسخها!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1095,8 +1095,8 @@ msgid "No disk selected!"
|
||||
msgstr "Keine Festplatte ausgewählt!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "Festplatte %s ist kleiner als 1GB und kann nicht geklont werden!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "Festplatte %s ist kleiner als 2GB und kann nicht geklont werden!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1094,7 +1094,7 @@ msgid "No disk selected!"
|
||||
msgstr ""
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr ""
|
||||
|
||||
#: menu.sh:2342
|
||||
|
@ -1095,8 +1095,8 @@ msgid "No disk selected!"
|
||||
msgstr "¡No hay ningún disco seleccionado!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "Disk %s de tamaño es inferior a 1GB y no se puede clonar!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "Disk %s de tamaño es inferior a 2GB y no se puede clonar!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1095,7 +1095,7 @@ msgid "No disk selected!"
|
||||
msgstr "Aucun disque sélectionné !"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "La taille du disque %s est inférieure à 1 Go et ne peut pas être clonée !"
|
||||
|
||||
#: menu.sh:2342
|
||||
|
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "ディスクが選択されていません!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "ディスク %s のサイズが1GB未満で、クローンできません!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "ディスク %s のサイズが2GB未満で、クローンできません!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "선택한 디스크가 없습니다!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "디스크 %s 크기가 1GB 미만이어서 복제할 수 없습니다!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "디스크 %s 크기가 2GB 미만이어서 복제할 수 없습니다!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1239,7 +1239,7 @@ msgid "No disk selected!"
|
||||
msgstr ""
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr ""
|
||||
|
||||
#: menu.sh:2342
|
||||
|
@ -1094,7 +1094,7 @@ msgid "No disk selected!"
|
||||
msgstr "Диск не выбран!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "Размер диска %s меньше 1 ГБ и не может быть клонирован!"
|
||||
|
||||
#: menu.sh:2342
|
||||
|
@ -1095,8 +1095,8 @@ msgid "No disk selected!"
|
||||
msgstr "ไม่มีดิสก์ที่เลือก!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "ขนาดดิสก์ %s น้อยกว่า 1GB และไม่สามารถคัดลอก!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "ขนาดดิสก์ %s น้อยกว่า 2GB และไม่สามารถคัดลอก!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "Disk seçilmedi!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "%s disk boyutu 1GB'den küçük ve klonlanamaz!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "%s disk boyutu 2GB'den küçük ve klonlanamaz!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1095,7 +1095,7 @@ msgid "No disk selected!"
|
||||
msgstr "Немає вибраного диска!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "Розмір диска %s менше 1 Гб і не можна клонувати!"
|
||||
|
||||
#: menu.sh:2342
|
||||
|
@ -1095,8 +1095,8 @@ msgid "No disk selected!"
|
||||
msgstr "Không có đĩa nào được chọn!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "Kích thước đĩa %s nhỏ hơn 1GB và không thể được sao chép!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "Kích thước đĩa %s nhỏ hơn 2GB và không thể được sao chép!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "未选择磁盘!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "磁盘 %s 的大小小于 1GB,无法克隆!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "磁盘 %s 的大小小于 2GB,无法克隆!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "未選擇磁碟!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "磁碟 %s 的大小小於 1GB, 無法克隆!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "磁碟 %s 的大小小於 2GB, 無法克隆!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1094,8 +1094,8 @@ msgid "No disk selected!"
|
||||
msgstr "未選擇磁碟!"
|
||||
|
||||
#: menu.sh:2338
|
||||
msgid "Disk %s size is less than 1GB and cannot be cloned!"
|
||||
msgstr "磁碟 %s 大小小於 1GB,無法複製!"
|
||||
msgid "Disk %s size is less than 2GB and cannot be cloned!"
|
||||
msgstr "磁碟 %s 大小小於 2GB,無法複製!"
|
||||
|
||||
#: menu.sh:2342
|
||||
msgid "Warning:\\nDisk %s will be formatted and written to the bootloader. Please confirm that important data has been backed up. \\nDo you want to continue?"
|
||||
|
@ -1838,7 +1838,7 @@ function allowDSMDowngrade() {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
rm -f "${TMP_PATH}/mdX/etc/VERSION" "${TMP_PATH}/mdX/etc.defaults/VERSION"
|
||||
sync
|
||||
@ -1869,7 +1869,7 @@ function resetDSMPassword() {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
if [ -f "${TMP_PATH}/mdX/etc/shadow" ]; then
|
||||
while read -r L; do
|
||||
@ -1920,7 +1920,7 @@ function resetDSMPassword() {
|
||||
NEWPASSWD="$(openssl passwd -6 -salt "$(openssl rand -hex 8)" "${STRPASSWD}")"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
sed -i "s|^${USER}:[^:]*|${USER}:${NEWPASSWD}|" "${TMP_PATH}/mdX/etc/shadow"
|
||||
sed -i "/^${USER}:/ s/^\(${USER}:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\)[^:]*:/\1:/" "${TMP_PATH}/mdX/etc/shadow"
|
||||
@ -1966,7 +1966,7 @@ function addNewDSMUser() {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
if [ -f "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db" ]; then
|
||||
sqlite3 "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db" <<EOF
|
||||
@ -2007,7 +2007,7 @@ function forceEnableDSMTelnetSSH() {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
if [ -f "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db" ]; then
|
||||
sqlite3 "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db" <<EOF
|
||||
@ -2050,7 +2050,7 @@ function removeBlockIPDB {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
rm -f "${TMP_PATH}/mdX/etc/synoautoblock.db"
|
||||
sync
|
||||
@ -2082,7 +2082,7 @@ function disablescheduledTasks {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
if [ -f "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db" ]; then
|
||||
echo "UPDATE task SET enable = 0;" | sqlite3 "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db"
|
||||
@ -2122,7 +2122,7 @@ function initDSMNetwork {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
rm -f "${TMP_PATH}/mdX/etc/sysconfig/network-scripts/ifcfg-bond"* "${TMP_PATH}/mdX/etc/sysconfig/network-scripts/ifcfg-eth"*
|
||||
rm -f "${TMP_PATH}/mdX/etc.defaults/sysconfig/network-scripts/ifcfg-bond"* "${TMP_PATH}/mdX/etc.defaults/sysconfig/network-scripts/ifcfg-eth"*
|
||||
@ -2258,7 +2258,7 @@ function tryRecoveryDSM() {
|
||||
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
fixDSMRootPart "${DSMROOTPART}"
|
||||
mount -t ext4 "${DSMROOTPART}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${DSMROOTPART}" "${TMP_PATH}/mdX"
|
||||
if [ $? -ne 0 ]; then
|
||||
DIALOG --title "$(TEXT "Settings")" \
|
||||
--msgbox "$(TEXT "Mount DSM system partition(md0) failed!\nPlease insert all disks before continuing.")" 0 0
|
||||
@ -2359,9 +2359,9 @@ function cloneBootloaderDisk() {
|
||||
fi
|
||||
TODESK="${resp}"
|
||||
SIZE=$(df -m "${TODESK}" 2>/dev/null | awk 'NR==2 {print $2}')
|
||||
if [ ${SIZE:-0} -lt 1024 ]; then
|
||||
if [ ${SIZE:-0} -lt 1536 ]; then
|
||||
DIALOG --title "$(TEXT "Settings")" \
|
||||
--msgbox "$(printf "$(TEXT "Disk %s size is less than 1GB and cannot be cloned!")" "${TODESK}")" 0 0
|
||||
--msgbox "$(printf "$(TEXT "Disk %s size is less than 2GB and cannot be cloned!")" "${TODESK}")" 0 0
|
||||
return
|
||||
fi
|
||||
|
||||
@ -2491,7 +2491,7 @@ function reportBugs() {
|
||||
mkdir -p "${TMP_PATH}/mdX"
|
||||
for I in ${DSMROOTS}; do
|
||||
fixDSMRootPart "${I}"
|
||||
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
|
||||
mount -t "$(blkid -o value -s TYPE "${I}")" "${I}" "${TMP_PATH}/mdX"
|
||||
[ $? -ne 0 ] && continue
|
||||
mkdir -p "${TMP_PATH}/logs/md0/log"
|
||||
cp -rf ${TMP_PATH}/mdX/.log.junior "${TMP_PATH}/logs/md0" 2>/dev/null
|
||||
|
@ -4,6 +4,7 @@ synoinfo: &synoinfo
|
||||
support_printer: "yes"
|
||||
support_usb_printer: "yes"
|
||||
support_disk_compatibility: "no"
|
||||
support_synodrive_ability: "no" # DS925+
|
||||
support_memory_compatibility: "no"
|
||||
support_memory_limitation: "no" # DVA3219
|
||||
support_led_brightness_adjustment: "no"
|
||||
@ -13,6 +14,8 @@ synoinfo: &synoinfo
|
||||
support_syno_hybrid_raid: "no"
|
||||
supportraidgroup: "no"
|
||||
enableRCPower: "yes"
|
||||
mem_max_mb: ""
|
||||
mem_min_mb: ""
|
||||
support_fan: "no"
|
||||
support_fan_adjust_dual_mode: "no"
|
||||
supportadt7490: "no"
|
||||
|
9
guide.md
9
guide.md
@ -79,7 +79,7 @@
|
||||
# 解压 并写入到引导盘
|
||||
# Decompress and write to the boot disk
|
||||
# 获取当前的引导盘
|
||||
LOADER_DISK="$(blkid | grep 'LABEL="RR3"' | cut -d3 -f1)"
|
||||
LOADER_DISK="$(blkid -L RR3 2>/dev/null | cut -d3 -f1)"
|
||||
unzip -p rr.zip | dd of=${LOADER_DISK} bs=1M conv=fsync
|
||||
# 重启 reboot
|
||||
reboot
|
||||
@ -87,7 +87,7 @@
|
||||
* RR 备份 (Any version):
|
||||
```shell
|
||||
# 备份为 disk.img.gz, 自行导出.
|
||||
dd if="$(blkid | grep 'LABEL="RR3"' | cut -d3 -f1)" | gzip > disk.img.gz
|
||||
dd if="$(blkid -L RR3 2>/dev/null | cut -d3 -f1)" | gzip > disk.img.gz
|
||||
# 结合 transfer.sh 直接导出链接
|
||||
curl -skL --insecure -w '\n' --upload-file disk.img.gz https://transfer.sh
|
||||
```
|
||||
@ -249,10 +249,11 @@
|
||||
# eudev
|
||||
udevadm control --reload-rules # 重新加载 udev 规则
|
||||
udevadm trigger # 触发 udev 事件
|
||||
udevadm info --query all --name /dev/sda1 # 查看 udev 属性
|
||||
udevadm info --query all --name /dev/sata1 # 查看 udev 属性
|
||||
udevadm info --query all --path /sys/class/net/eth0 # 查看 udev 属性
|
||||
udevadm info --attribute-walk --name=/dev/sata1 # 列出 udev 属性
|
||||
udevadm monitor --property --udev # 监控 udev 事件
|
||||
udevadm test /dev/sda1 # 测试 udev 规则
|
||||
udevadm test /dev/sata1 # 测试 udev 规则
|
||||
|
||||
# 服务相关
|
||||
journalctl -xe # 查看服务日志
|
||||
|
@ -178,9 +178,8 @@ function pack() {
|
||||
|
||||
local RRIMGPATH LOOPX
|
||||
RRIMGPATH="$(realpath "${1:-rr.img}")"
|
||||
if [ ! -f "${RRIMGPATH}" ]; then
|
||||
rm -f "${RRIMGPATH}"
|
||||
gzip -dc "${CHROOT_PATH}/initrd/opt/rr/grub.img.gz" >"${RRIMGPATH}"
|
||||
fi
|
||||
fdisk -l "${RRIMGPATH}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
@ -220,4 +219,32 @@ function pack() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
function resize() {
|
||||
local INPUT_FILE="${1}"
|
||||
local CHANGE_SIZE="${2}"
|
||||
local OUTPUT_FILE="${3:-${INPUT_FILE}}"
|
||||
|
||||
[ -z "${INPUT_FILE}" ] || [ ! -f "${INPUT_FILE}" ] && exit 1
|
||||
[ -z "${CHANGE_SIZE}" ] && exit 1
|
||||
|
||||
INPUT_FILE="$(realpath "${INPUT_FILE}")"
|
||||
OUTPUT_FILE="$(realpath "${OUTPUT_FILE}")"
|
||||
|
||||
local SIZE=$(($(du -sm "${INPUT_FILE}" 2>/dev/null | awk '{print $1}')$(echo "${CHANGE_SIZE}" | sed 's/M//g; s/b//g')))
|
||||
[ "${SIZE:-0}" -lt 0 ] && exit 1
|
||||
|
||||
if [ ! "${INPUT_FILE}" = "${OUTPUT_FILE}" ]; then
|
||||
sudo cp -f "${INPUT_FILE}" "${OUTPUT_FILE}"
|
||||
fi
|
||||
|
||||
sudo truncate -s ${SIZE}M "${OUTPUT_FILE}"
|
||||
echo -e "d\n\nn\n\n\n\n\nn\nw" | sudo fdisk "${OUTPUT_FILE}" >/dev/null 2>&1
|
||||
local LOOPX
|
||||
LOOPX=$(sudo losetup -f)
|
||||
sudo losetup -P "${LOOPX}" "${OUTPUT_FILE}"
|
||||
sudo e2fsck -fp "$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
sudo resize2fs "$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
sudo losetup -d "${LOOPX}"
|
||||
}
|
||||
|
||||
"$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user