dCore Import Debian Packages to Mountable SCE extensions > dCore X86
"version" command download location
jls:
Hi
At the moment the script downloads the new initrd under /tmp, what about downloading it under tcedir/boot, since that is the default location of the distro install script?
Thanks
nitram:
/tmp made sense at the time as users probably use different boot directories. I didn't realize there was an installer default - oops :)
Keeping it in /tmp may reduce disk writes for users like me not utilizing the default boot directory?
I've been using my own rcupdate script to call version -r and copy dCore updates from /tmp to my boot directory, just press Enter and reboot. Is there a way for the system to automagically know the dCore boot partition and directory? If so then the version script could be updated to automatically download dCore updates directly to the user's actual boot directory and create a backup copy of the existing file.
Jason W:
I have my *.gz and vmlinuz under /mnt/sda2/boot, but grub is installed to /mnt/sda3/boot/. Once running, I don't think there is a way to know which partition the active boot directory resides on. One alternative could be to download to ~/Downloads, but I am good either way.
nitram:
--- Quote from: Jason W on February 22, 2016, 09:29:56 AM ---Once running, I don't think there is a way to know which partition the active boot directory resides on.
--- End quote ---
Think you are correct. The only way might be if the version script either asks user to manually enter desired boot pathway before downloading or else create a new single line config file in /etc/sysconfig whereby user enters desired download path. The version script could be modified to read the config file, mount the designated partition, backup the existing dCore file and download the new version to the designated pathway, similar to below.
--- Quote ---One alternative could be to download to ~/Downloads, but I am good either way.
--- End quote ---
That would create a very large backup if user doesn't have persistent home and forgets to delete the download.
--- Code: ---#!/bin/busybox ash
PARTITION="/mnt/sdb1"
BOOTDIR="/mnt/sdb1/dCore/boot"
echo "dCore update check..."
echo " "
echo "If no immediate exit press Enter to download and install update. "
echo
if version -r | grep "the latest release candidate."; then
exit
else
mount "$PARTITION" >/dev/null 2>&1
cd "$BOOTDIR"
if [ -f *.md5.txt ]; then
sudo rm *.md5.txt
fi
if [ -f *.old ]; then
sudo rm *.old
fi
GZ=$(ls | grep dCore*.gz)
sudo mv -f "$GZ" "$GZ".old
sudo cp -f /tmp/release_candidate/* "$BOOTDIR"
echo " "
echo "Update installed, outdated "$GZ" file backed up as"
echo ""$GZ".old. Reboot system to apply update."
fi
--- End code ---
Jason W:
Current behavior seems good to me.
Navigation
[0] Message Index
[#] Next page
Go to full version