fb_enable_firstrun() { local script="/opt/openslx/firstrun.sh" [ -x "$script" ] || perror "Firstrun script not found ($script)" if ! grep -qF "$script" "/home/bwlp/.profile"; then echo "# Patching bwlp's .profile" echo "[ -t 0 ] && $script" >> "/home/bwlp/.profile" chown bwlp:bwlp "/home/bwlp/.profile" "$script" fi } fb_write_config() { # So we know all the paths declare -p DMSDDIR TASKMANDIR SLXADMINDIR VERSION >> "$CONFIG_FILE" } enable_firstrun_script () { fb_enable_firstrun fb_write_config systemctl daemon-reload systemctl enable firstboot.service || perror "Could not enable firstboot service" }