Quickbox-setup _logcheck() function clarification


#1

I was wondering about lines 121-124 of the setup script (in _logcheck() function):

  if [[ ! -d /root/tmp ]]; then
    sed -i 's/noexec,//g' /etc/fstab
    mount -o remount /tmp >>"${OUTTO}" 2>&1
  fi
  • it seems quite overreaching to remove every occurrences of the noexec mount option: it is still valid to have it on a separate /home mount point for example;
  • more importantly, I don’t understand the logic at play here:
    1. We check whether /root/tmp is a directory;
    2. If it isn’t, we remount the /tmp mount point ?!

I really don’t get it. How /tmp and /root/tmp are connected? Since we check whether /root/tmp is a directory, shouldn’t we create it in case it isn’t?

Thanks for the clarification!


#2

This is to protect and preserve existing settings (already edited) by the install script. It is a measure put in place due to occurrences of premature script exit on the install. That /root/tmp directory is built in order to compile things such as ffmpeg, rutorrent … etc.

example: #L513 Line # 513 in the setup script

It’s probably not the most elegant solution, however, if you feel that you can provide a greater logic on the matter, remember – we’re a community developed resource. Please don’t be discouraged from making a contribution to the code.

I will say in the end however that this provides no lack of efficiency to the install and is our given attempt at trying to keep the install on various providers and solutions as universal as possible. Sometimes we must sacrifice common logic to achieve a large base of versatility… I know… again, not the most elegant… but hey, this is our spare time :stuck_out_tongue: