Skip to content

Commit bea573a

Browse files
committed
feature/fsck: Add workaround for altlinux where fsck has non upstream compatible options
Signed-off-by: Alexey Gladkov <[email protected]>
1 parent 456f888 commit bea573a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

features/fsck/data/lib/uevent/handlers/040-mountdev

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
. /.initrd/initenv
44

55
. shell-locks
6+
. shell-source
7+
8+
FSCK_ARGS="-p"
9+
source_if_exists /etc/sysconfig/fsck
610

711
. /etc/init.d/functions
812
. uevent-sh-functions
@@ -26,7 +30,7 @@ handler()
2630

2731
rootdelay_pause
2832

29-
action "Checking filesystem [$MOUNTDEV]:" fsck -t noloop,noswap -T "$MOUNTDEV" -- -p ||
33+
action "Checking filesystem [$MOUNTDEV]:" fsck -t noloop,noswap -T "$MOUNTDEV" -- $FSCK_ARGS ||
3034
rc=$?
3135

3236
if [ "$rc" = 0 ] || [ "$rc" = 1 ]; then

features/fsck/rules.mk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ FSCK_RUNTIME_FILES := $(shell $(call shell-export-vars) $(FEATURESDIR)/fsck/bin/
33

44
PUT_FEATURE_DIRS += $(FSCK_DATADIR)
55
PUT_FEATURE_FILES += $(FSCK_FILES) $(FSCK_RUNTIME_FILES)
6+
7+
VENDOR =
8+
ifneq "$(wildcard /etc/os-release)" ""
9+
VENDOR = $(shell sed -n -e 's/^ID=//p' /etc/os-release)
10+
endif
11+
12+
ifeq "$(VENDOR)" "altlinux"
13+
$(call set-sysconfig,fsck,FSCK_ARGS,-py)
14+
endif

0 commit comments

Comments
 (0)