[Google Pixel XL ROMs, Kernels, Recoveries, & Other] Namelesswonder:
In v2.1 both files are the exact same, so it doesn't matter which one you use. That may not be the case for other versions though.

On to talking about the script for [MENTION=8852292]xFirefly93[/MENTION] :

I wouldn't sleep the script for 30 seconds, because you're holding back the initialization of other service scripts and module service scripts.

I was wondering why I couldn't ssh into my phone immediately after it booted, Magisk hadn't started the service for it yet because it was waiting for the script to finish sleeping.​

The usual spiel about the noatime mount option.

Honestly I don't use noatime, I go with relatime as the penalty is vastly reduced compared to atime, and you still keep access times. Does it matter for the life of the flash storage? A little. Honestly the phone will probably just outright fail from other hardware faults regardless over saving the one extra write compared to relatime.​

You can remove nodiratime, it's implicitly set when you use noatime.​

Disabling zram is probably the best for battery and most users.

Unless someone really doesn't want the OOM killer coming after their apps, just set it small and swappiness low to stop it from being used until it really needs to.

You don't need to set the disksize or reset the zram device after you've did swapoff on it, it'll automatically set the disksize to 0.​

I honestly wouldn't use '/sys/kernel/fast_charge/force_fast_charge', mainly because I just had to replace the swollen battery in my phone.

I'd hold battery health over convenience.​

I wouldn't TRIM after each boot, because if someone has a 128GB phone then you could hold up the Magisk script initialization for up to a couple minutes.

Would be better to recommend someone to use any of the fstrim apps that can schedule an fstrim during low activity time every week or so.

You also don't need to TRIM /cache, as /cache is just a symlink to /data/cache, which would've already been trimmed.​

Your logging in the script is fundamentally flawed.

You have a test command that isn't part of an if statement, so it's basically doing absolutely nothing.

You aren't encapsulating $? in double quotes, it's recommended to do this with 'old' test commands.

You are checking for the exit status of the last ran command, which is going to be the echo right above it.

Without the if statement every after the first 'exit' is never ran.

Most importantly, you are logging to /storage, which can be encrypted during execution of the script if the user hasn't unlocked their phone yet.​

I'd recommend changing the script to something like this or in the attachments of the post: https://hastebin.com/zovuwubata.bash

There the script has it's log file set to /data/cache/kernel-config.log, which won't be encrypted during boot.

It'll also rotate the log file if it detects a previous one.

Along with that it will log the success or failure of each command, and for kernel devices it will print the current value and then check the newly set value.

nodiratime was removed from the mount options because it's already set by noatime.

ZRAM gets disabled by a backgrounded subshell that waits for 20 seconds for it to finish initialization.

fstrim is done in a backgrounded subshell also, so as to not block Magisk init, and /cache isn't trimmed because it is a symlink to /data/cache which already gets trimmed.