Fedora 44, install/configure improvements, Nextcloud desktop client fixes #24
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# configure.sh — First-time setup wizard
|
# configure.sh — First-time setup wizard
|
||||||
|
|
||||||
Run `system_setup/configure.sh` as a **normal user** (not root) on the machine that has the OEMDRV partition mounted. It guides you through all site-specific settings, tests the configuration, and leaves the system ready for a Fedora installation.
|
Run `system_setup/configure.sh` on the machine that has the OEMDRV partition mounted. It guides you through all site-specific settings, tests the configuration, and leaves the system ready for a Fedora installation. Can be run as root or as a normal user — `install.sh` pre-creates `ks.cfg` at the OEMDRV root with world-write permission so both cases work.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash /opt/sys_config/system_setup/configure.sh
|
bash /opt/sys_config/system_setup/configure.sh
|
||||||
|
|||||||
@@ -8,11 +8,6 @@ SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
|
|||||||
CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist"
|
CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist"
|
||||||
CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf"
|
CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf"
|
||||||
|
|
||||||
if [[ "$EUID" -eq 0 ]]; then
|
|
||||||
echo "ERROR: This script must not be run as root." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prompt for a single value; returns the old value unchanged if the user presses Enter.
|
# Prompt for a single value; returns the old value unchanged if the user presses Enter.
|
||||||
prompt_value() {
|
prompt_value() {
|
||||||
local name="$1" current="$2" new_val
|
local name="$1" current="$2" new_val
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ finish_install() {
|
|||||||
chmod ug=rwX,o=rX "$MOUNT_POINT" -R
|
chmod ug=rwX,o=rX "$MOUNT_POINT" -R
|
||||||
chmod o+w "$MOUNT_POINT/config" "$MOUNT_POINT/config.d"
|
chmod o+w "$MOUNT_POINT/config" "$MOUNT_POINT/config.d"
|
||||||
|
|
||||||
|
# Create an empty ks.cfg at the OEMDRV root so non-root can overwrite it
|
||||||
|
# with configure.sh (the OEMDRV root itself is not world-writable).
|
||||||
|
touch "$MOUNT_POINT/ks.cfg"
|
||||||
|
chmod o+w "$MOUNT_POINT/ks.cfg"
|
||||||
|
|
||||||
info "Done."
|
info "Done."
|
||||||
echo
|
echo
|
||||||
echo " OEMDRV device : $dev"
|
echo " OEMDRV device : $dev"
|
||||||
@@ -42,13 +47,12 @@ finish_install() {
|
|||||||
echo
|
echo
|
||||||
read -r -p "Run configure.sh now to set up your environment? [y/N]: " RUN_CONF
|
read -r -p "Run configure.sh now to set up your environment? [y/N]: " RUN_CONF
|
||||||
if [[ "${RUN_CONF,,}" == "y" ]]; then
|
if [[ "${RUN_CONF,,}" == "y" ]]; then
|
||||||
if [[ -n "$SUDO_USER" ]]; then
|
if [[ -n "$SUDO_USER" && "$SUDO_USER" != "root" ]]; then
|
||||||
info "Running configure.sh as user '$SUDO_USER'..."
|
info "Running configure.sh as user '$SUDO_USER'..."
|
||||||
su - "$SUDO_USER" -c "DISPLAY='${DISPLAY}' WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' bash '$CONF_SCRIPT'"
|
su - "$SUDO_USER" -c "DISPLAY='${DISPLAY}' WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' bash '$CONF_SCRIPT'"
|
||||||
else
|
else
|
||||||
echo
|
info "Running configure.sh as root..."
|
||||||
echo "configure.sh must be run as a non-root user. Please run:"
|
bash "$CONF_SCRIPT"
|
||||||
echo " bash $CONF_SCRIPT"
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user