Skip to content

SWAP Partition bug #725

Answered by fda77
asmcc asked this question in General
Jan 30, 2023 · 11 comments · 3 replies
Discussion options

You must be logged in to vote

So vielleicht:

# Special case SWAP partition
if [ -e /etc/init.d/rc.swap ]; then
	if [ "$(modconf value MOD_SWAP mod)" == "yes" ]; then
		if [ "$(modconf value MOD_SWAP_FILE mod | grep '/dev')" == "$_BD" ]; then
			/etc/init.d/rc.swap autostart "$_BD"
			_RV=$?
		fi
	fi
fi
if [ "$_RV" == "0" ]; then
	eventadd 140 "SWAP Partition $_BD"
	udev_log $_RV "$_BD - mounted as SWAP partition"
else
	eventadd 142 "Partition $_BD" "$_FS"
	udev_log $_RV "$_BD - unsupported filesystem or partition table${_FS:+: $_FS}"
fi

Oder das gleiche als Einzeiler - zur besseren Lesbarkeit in mehrere Zeilen:

[ -e /etc/init.d/rc.swap ] && \
  [ "$(modconf value MOD_SWAP mod)" == "yes" ] && \
  [ "$(modconf value MO…

Replies: 11 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@fda77
Comment options

@asmcc
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by asmcc
Comment options

You must be logged in to vote
1 reply
@fda77
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants