Download raw body.
sysupgrade vs NFS
15.06.2025 14:44, Claudio Jeker пишет:
> On Sun, Jun 15, 2025 at 11:40:36AM +0000, Klemens Nanni wrote:
>> 15.06.2025 12:40, Stuart Henderson пишет:
>>> The earlier diff used df | grep : to identify NFS, which resulted in an
>>> incorrect error being printed in the event /home was on MFS. (Possible
>>> with some read-only mount configs using -P).
>>>
>>> The messsage does seem needlessly detailed though. "Filesystem type for
>>> ${SETSDIR} not supported"?
>>
>> That's reads better and doesn't warrant any additional manual bits, imho.
>>
>> You could copy what reorder_kernel.sh does:
>>
>> # Silently skip if on a NFS mounted filesystem.
>> df -t nonfs $KERNEL_DIR >/dev/null 2>&1
>>
>> That'll still let you fetch to MFS, but whatever...
>>
>> This is OK kn if anyone wants to commit (feel free to tweak the error messaage).
>>
>
> Why not change this to ensure that the directory used is on a ffs
> filesystem? I think sysupgrade only reliably works that way.
Sure, also fine with me.
Index: sysupgrade.sh
===================================================================
RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
diff -u -p -r1.58 sysupgrade.sh
--- sysupgrade.sh 3 Feb 2025 18:55:55 -0000 1.58
+++ sysupgrade.sh 15 Jun 2025 12:25:27 -0000
@@ -133,6 +133,8 @@ if $FILE; then
fi
install -d -o 0 -g 0 -m 0755 ${SETSDIR}
+df -t ffs ${SETSDIR} >/dev/null 2>&1 ||
+ err "${SETSDIR}: filesystem type not suppored"
cd ${SETSDIR}
echo "Fetching from ${URL}"
sysupgrade vs NFS