Skip to content
Snippets Groups Projects
Commit 425f9294 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

copy upstream configuration file before the call of 66-env -r

parent 3fa67502
Branches
Tags
No related merge requests found
......@@ -62,6 +62,12 @@ config_enable_boot(){
66-enable -zv3 -t boot -F boot@system || die "unable to enable boot@system"
# By default the configuration file is prefixed with a dot.
# 66-env -r do not know about it, so copy it without the prefix
BOOT_CONF="$(readlink /etc/66/conf/boot@system/version)"
cp "${BOOT_CONF}/.boot@system" "${BOOT_CONF}/boot@system" || die "unable to cp boot@system configuration file"
oblog "Configure boot@system service"
66-env -t boot -r "HOSTNAME=\!${HOSTNAME}" -r "KEYMAP=\!${KEYMAP}" -r "TZ=${ZONE}/${SUBZONE}" boot@system || die "unable to configure boot@system service"
......
......@@ -62,6 +62,14 @@ config_enable_boot(){
66-enable -zv3 -t boot -F boot@system || die "unable to enable boot@system"
# By default the configuration file is prefixed with a dot.
# 66-env -r do not know about it, so copy it without the prefix
BOOT_CONF="$(readlink /etc/66/conf/boot@system/version)"
cp "${BOOT_CONF}/.boot@system" "${BOOT_CONF}/boot@system" || die "unable to cp boot@system configuration file"
oblog "Configure boot@system service"
66-env -t boot -r "HOSTNAME=\!${HOSTNAME}" -r "KEYMAP=\!${KEYMAP}" -r "TZ=${ZONE}/${SUBZONE}" boot@system || die "unable to configure boot@system service"
oblog "Apply change to the boot@system service"
......
......@@ -62,6 +62,14 @@ config_enable_boot(){
66-enable -zv3 -t boot -F boot@system || die "unable to enable boot@system"
# By default the configuration file is prefixed with a dot.
# 66-env -r do not know about it, so copy it without the prefix
BOOT_CONF="$(readlink /etc/66/conf/boot@system/version)"
cp "${BOOT_CONF}/.boot@system" "${BOOT_CONF}/boot@system" || die "unable to cp boot@system configuration file"
oblog "Configure boot@system service"
66-env -t boot -r "HOSTNAME=\!${HOSTNAME}" -r "KEYMAP=\!${KEYMAP}" -r "TZ=${ZONE}/${SUBZONE}" || die "unable to configure boot@system service"
oblog "Apply change to the boot@system service"
......@@ -97,6 +105,10 @@ config_enable_boot_user(){
66-enable -zv3 -t boot-user -F boot-user@${NEWUSER} || die "unable to enable boot-user@${NEWUSER} service"
BOOT_USER="$(readlink /etc/66/conf/boot-user@${NEWUSER}/version)"
cp "${BOOT_USER}/.boot-user@${NEWUSER}" "${BOOT_USER}/boot-user@${NEWUSER}"
oblog "Configure boot-user@${NEWUSER} service"
66-env -t boot-user -r "DESKTOP_CMDLINE=\!openbox-session" boot-user@${NEWUSER} || die "unable to set DESKTOP_CMDLINE"
......
......@@ -76,14 +76,11 @@ config_enable_boot(){
out_progress "Done"
#sleep 1
## this is a little ugly, 66-env -r works properly but remove comment
## inside the configuration file. It can be confusing to a new user
## to not have the comments.
## So, first find the current version of the configuration file and use
## the classic sed command instead of 66-env.
# By default the configuration file is prefixed with a dot.
# 66-env -r do not know about it, so copy it without the prefix
BOOT_CONF="$(readlink /etc/66/conf/boot@system/version)"
BOOT_CONF="${BOOT_CONF}/boot@system"
cp "${BOOT_CONF}/.boot@system" "${BOOT_CONF}/boot@system" || die "unable to cp boot@system configuration file"
oblog "Configure (boot@system) service"
out_progress "Starting ..."
......@@ -141,6 +138,10 @@ config_enable_boot_user(){
out_progress "Done"
#sleep 1
BOOT_USER="$(readlink /etc/66/conf/boot-user@${NEWUSER}/version)"
cp "${BOOT_USER}/.boot-user@${NEWUSER}" "${BOOT_USER}/boot-user@${NEWUSER}"
oblog "Configure (boot-user@${NEWUSER}) service"
out_progress "Starting ..."
......
......@@ -61,11 +61,17 @@ config_enable_boot(){
oblog "Enable boot@system service at tree boot"
66-enable -zv3 -t boot -C -F boot@system || die "unable to enable boot@system"
66-enable -zv3 -t boot -F boot@system || die "unable to enable boot@system"
# By default the configuration file is prefixed with a dot.
# 66-env -r do not know about it, so copy it without the prefix
BOOT_CONF="$(readlink /etc/66/conf/boot@system/version)"
cp "${BOOT_CONF}/.boot@system" "${BOOT_CONF}/boot@system" || die "unable to cp boot@system configuration file"
oblog "Configure boot@system service"
66-env -t boot -r "HOSTNAME=\!${HOSTNAME}" -r "KEYMAP=\!${KEYMAP}" -r "TZ=${ZONE}/${SUBZONE}" boot@system || die "unable to configure boot@system service"
66-env -t boot -r "HOSTNAME=\!${HOSTNAME}" -r "KEYMAP=\!${KEYMAP}" -r "TZ=${ZONE}/${SUBZONE}" boot@system || die "unable to configure boot@system service"
oblog "Apply change to the boot@system service"
......@@ -98,10 +104,11 @@ config_enable_boot_user(){
oblog "Enable boot-user@${NEWUSER} at boot-user tree"
66-enable -zv3 -t boot-user -C -F boot-user@${NEWUSER} || die "unable to enable boot-user@${NEWUSER} service"
66-enable -zv3 -t boot-user -F boot-user@${NEWUSER} || die "unable to enable boot-user@${NEWUSER} service"
BOOT_USER="$(readlink /etc/66/conf/boot-user@${NEWUSER}/version)"
BOOT_USER="${BOOT_USER}/boot-user@${NEWUSER}"
cp "${BOOT_USER}/.boot-user@${NEWUSER}" "${BOOT_USER}/boot-user@${NEWUSER}"
oblog "Configure boot-user@${NEWUSER} service"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment