diff --git a/files/board/arpl/overlayfs/usr/sbin/arpl-reboot.sh b/files/board/arpl/overlayfs/usr/sbin/arpl-reboot.sh index f9161482..3230d2c9 100755 --- a/files/board/arpl/overlayfs/usr/sbin/arpl-reboot.sh +++ b/files/board/arpl/overlayfs/usr/sbin/arpl-reboot.sh @@ -8,5 +8,8 @@ function use() { [ -z "${1}" ] && use [ "${1}" != "junior" -a "${1}" != "config" ] && use echo "Rebooting to ${1} mode" -grub-editenv /mnt/p1/boot/grub/grubenv set next_entry="${1}" +GRUBPATH="$(dirname $(find /mnt/p1/ -name grub.cfg | head -1))" +ENVFILE="${GRUBPATH}/grubenv" +[ ! -f "${ENVFILE}" ] && grub-editenv ${ENVFILE} create +grub-editenv ${ENVFILE} set next_entry="${1}" reboot diff --git a/rssupdate.py b/rssupdate.py index 8221cabe..ecd16e63 100644 --- a/rssupdate.py +++ b/rssupdate.py @@ -48,8 +48,8 @@ def synoextractor(url): commands = ['sudo', 'rm', '-rf', filename, filepath] result = subprocess.check_output(commands) - req = requests.get(url.replace(urlparse(url).netloc, 'cndl.synology.cn')) - #req = requests.get(url) + # req = requests.get(url.replace(urlparse(url).netloc, 'cndl.synology.cn')) + req = requests.get(url) with open(filename, "wb") as f: f.write(req.content)