This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.pxe-serve: serve from a world-traversable directory

+8 -2
+8 -2
tools/pxe-serve/pxe-serve.sh
··· 160 160 # after running, so it deleted the served directory out from under a still 161 161 # running dnsmasq and then went back to waiting. Only symlinks live here, so 162 162 # leaving them behind between runs costs nothing. 163 - ROOT="${XDG_RUNTIME_DIR:-/tmp}/${PROG}/${MACHINE}" 163 + # 164 + # Not under XDG_RUNTIME_DIR: dnsmasq drops privileges after startup, and 165 + # /run/user/$UID is mode 0700, so the unprivileged dnsmasq cannot traverse it 166 + # ("TFTP directory ... inaccessible: Permission denied", then it refuses to 167 + # start). Everything served is a symlink into the world-readable nix store, 168 + # so a world-traversable directory costs nothing. 169 + ROOT="/var/tmp/${PROG}/${MACHINE}" 164 170 rm -rf "$ROOT" 165 171 mkdir -p "$ROOT" 166 - chmod 755 "$ROOT" 172 + chmod 755 "/var/tmp/${PROG}" "$ROOT" 167 173 168 174 ln -s "${KERNEL}/${KERNEL_FILE}" "$ROOT/bzImage" 169 175 ln -s "${INITRD}/initrd" "$ROOT/initrd"