Skip to content

Commit

Permalink
add find grub path, typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed May 3, 2023
1 parent cf57e16 commit 25bcdf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion files/board/arpl/overlayfs/usr/sbin/arpl-reboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions rssupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 25bcdf1

Please sign in to comment.