mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add find grub path, typo
This commit is contained in:
parent
cf57e16966
commit
25bcdf18d2
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user