mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Meta: Fix problematic e2fsck
behavior (Debian)
Under Debian `e2fsck` is found in `/sbin/` which does not match the existing "version" the script currently uses (`/usr/sbin/e2fsck` versus `/sbin/e2fsck`); therefore I added a simple `if` condition to remedy the situation by verifying whether the original path exists or not, so I can use the one Debian expects. Special thanks goes to Tim Flynn a.k.a. `trflynn89` for his valuable feedback.
This commit is contained in:
parent
2212aa2388
commit
43d706a29e
Notes:
sideshowbarker
2024-07-17 19:46:07 +09:00
Author: https://github.com/stefanos82 Commit: https://github.com/SerenityOS/serenity/commit/43d706a29e6 Pull-request: https://github.com/SerenityOS/serenity/pull/12279 Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 7 additions and 1 deletions
|
@ -74,6 +74,12 @@ DISK_SIZE_BYTES=$((($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Roo
|
|||
DISK_SIZE_BYTES=$(((DISK_SIZE_BYTES + (INODE_COUNT * INODE_SIZE * 2)) * 3))
|
||||
INODE_COUNT=$((INODE_COUNT * 7))
|
||||
|
||||
E2FSCK="/usr/sbin/e2fsck"
|
||||
|
||||
if [ ! -f "$E2FSCK" ]; then
|
||||
E2FSCK=/sbin/e2fsck
|
||||
fi
|
||||
|
||||
USE_EXISTING=0
|
||||
|
||||
if [ -f _disk_image ]; then
|
||||
|
@ -81,7 +87,7 @@ if [ -f _disk_image ]; then
|
|||
|
||||
echo "checking existing image"
|
||||
result=0
|
||||
/usr/sbin/e2fsck -f -y _disk_image || result=$?
|
||||
"$E2FSCK" -f -y _disk_image || result=$?
|
||||
if [ $result -ge 4 ]; then
|
||||
rm -f _disk_image
|
||||
USE_EXISTING=0
|
||||
|
|
Loading…
Reference in a new issue