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

pass through custo_once for each 66 config process

parent f1fcedfd
Branches
Tags
No related merge requests found
......@@ -50,14 +50,20 @@ create_log_user(){
}
custo_once create_log_user
config_66(){
config_tree_boot(){
oblog "Create tree boot"
66-tree -zv3 -n boot || die "unable to create boot tree"
}
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"
## 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.
......@@ -68,31 +74,66 @@ config_66(){
BOOT_CONF="${BOOT_CONF}/boot@system"
oblog "Configure boot@system service"
sed -i "s:^HOSTNAME.*$:HOSTNAME=\!${HOSTNAME}:" ${BOOT_CONF} || die "unable to set HOSTANME"
sed -i "s:^KEYMAP.*$:KEYMAP=\!${KEYMAP}:" ${BOOT_CONF} || die "unable to set KEYMAP"
sed -i "s:^TZ.*$:TZ=${ZONE}/${SUBZONE}:" ${BOOT_CONF} || die "unable to set TZ"
oblog "Apply change to the boot@system service"
66-enable -zv3 -t boot -F boot@system || die "unable to apply boot changes"
}
oblog "Create tree root, enables and make it current"
66-tree -zv3 -Ecn root || die "unable to create root tree"
config_tree_root(){
oblog "Create tree root and enable it"
66-tree -zv3 -cnE root || die "unable to create root tree"
}
config_enable_root(){
oblog "Enable consolekit, dbus, openntpd, connmand and wpa_supplicant on tree root"
66-enable -zv3 consolekit dbus openntpd connmand wpa_supplicant || die "unable to enable dbus openntpd connmand wpa_supplicant"
}
config_tree_boot_user(){
oblog "Create boot-user tree"
66-tree -zv3 -En boot-user || die "unable to create boot-user tree"
}
oblog "Create tree ${NEWUSER}-session for ${NEWUSER} user"
66-tree -zv3 -En ${NEWUSER}-session || die "unable to create ${NEWUSER}-session tree"
config_enable_boot_user(){
oblog "Enable boot-user@${NEWUSER} at boot-user tree"
66-enable -zv3 -t ${NEWUSER}-session -C -F boot-user@${NEWUSER} || die "unable to enable boot-user@${NEWUSER} service"
oblog "Create tree graphics for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "66-tree -zv3 -Ecn graphics" || die "unable to create graphics tree"
oblog "Enable xdg-user-dirs, dbus-session@${NEWUSER} on tree graphics"
66-enable -zv3 -t boot-user -C -F boot-user@${NEWUSER} || die "unable to enable boot-user@${NEWUSER} service"
}
config_tree_base_user(){
oblog "Create base tree for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "66-tree -zv3 -Ecn base" || die "unable to create base tree"
}
config_enable_base_user(){
oblog "Enable xdg-user-dirs, dbus-session@${NEWUSER} on base tree"
su "${NEWUSER}" -c "66-enable -zv3 xdg-user-dirs dbus-session@${NEWUSER}" || die "unable to enable xdg-user-dirs dbus-session@${NEWUSER} service"
}
custo_once config_66
custo_once config_tree_boot
custo_once config_enable_boot
custo_once config_tree_root
custo_once config_enable_root
custo_once config_tree_boot_user
custo_once config_enable_boot_user
custo_once config_tree_base_user
custo_once config_enable_base_user
oblog "Customization terminate"
......@@ -44,14 +44,19 @@ custo_once() {
############################## only modifie this script after this line ############################
config_tree_boot(){
config_66(){
oblog "Create tree boot"
66-tree -zv3 -n boot || die "unable to create boot tree"
}
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"
## 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.
......@@ -62,20 +67,34 @@ config_66(){
BOOT_CONF="${BOOT_CONF}/boot@system"
oblog "Configure boot@system service"
sed -i "s:^HOSTNAME.*$:HOSTNAME=\!${HOSTNAME}:" ${BOOT_CONF} || die "unable to set HOSTANME"
sed -i "s:^KEYMAP.*$:KEYMAP=\!${KEYMAP}:" ${BOOT_CONF} || die "unable to set KEYMAP"
sed -i "s:^TZ.*$:TZ=${ZONE}/${SUBZONE}:" ${BOOT_CONF} || die "unable to set TZ"
oblog "Apply change to the boot@system service"
66-enable -zv3 -t boot -F boot@system || die "unable to apply boot changes"
}
config_tree_root(){
oblog "Create tree root and enable it"
66-tree -zv3 -cnE root || die "unable to create root tree"
}
config_enable_root(){
oblog "Enable dhcpd service"
66-enable -zv3 -t root dhcpcd || die "unable to enable dhcpcd"
}
custo_once config_66
custo_once config_tree_boot
custo_once config_enable_boot
custo_once config_tree_root
custo_once config_enable_root
oblog "Customization terminate"
......@@ -50,14 +50,19 @@ create_log_user(){
}
custo_once create_log_user
config_66(){
config_tree_boot(){
oblog "Create tree boot"
66-tree -zv3 -n boot || die "unable to create boot tree"
}
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"
## 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.
......@@ -68,24 +73,43 @@ config_66(){
BOOT_CONF="${BOOT_CONF}/boot@system"
oblog "Configure boot@system service"
sed -i "s:^HOSTNAME.*$:HOSTNAME=\!${HOSTNAME}:" ${BOOT_CONF} || die "unable to set HOSTANME"
sed -i "s:^KEYMAP.*$:KEYMAP=\!${KEYMAP}:" ${BOOT_CONF} || die "unable to set KEYMAP"
sed -i "s:^TZ.*$:TZ=${ZONE}/${SUBZONE}:" ${BOOT_CONF} || die "unable to set TZ"
oblog "Apply change to the boot@system service"
66-enable -zv3 -t boot -F boot@system || die "unable to apply boot changes"
}
config_tree_root(){
oblog "Create tree root, enables and make it current"
66-tree -zv3 -Ecn root || die "unable to create root tree"
oblog "Create tree root and enable it"
66-tree -zv3 -cnE root || die "unable to create root tree"
}
config_enable_root(){
oblog "Enable consolekit, dbus, openntpd, connmand and wpa_supplicant on tree root"
oblog "Enable dbus, openntpd, connmand and wpa_supplicant on tree root"
66-enable -zv3 consolekit dbus openntpd connmand wpa_supplicant || die "unable to enable dbus openntpd connmand wpa_supplicant"
}
oblog "Create tree ${NEWUSER}-session for ${NEWUSER} user"
66-tree -zv3 -En ${NEWUSER}-session || die "unable to create ${NEWUSER}-session tree"
config_tree_boot_user(){
oblog "Enable boot-user@${NEWUSER} at ${NEWUSER}-session tree"
66-enable -zv3 -t ${NEWUSER}-session -C -F boot-user@${NEWUSER} || die "unable to enable boot-user@${NEWUSER} service"
oblog "Create boot-user tree"
66-tree -zv3 -En boot-user || die "unable to create boot-user tree"
}
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"
BOOT_USER="$(readlink /etc/66/conf/boot-user@${NEWUSER}/version)"
BOOT_USER="${BOOT_USER}/boot-user@${NEWUSER}"
......@@ -94,16 +118,31 @@ config_66(){
sed -i "s:^DESKTOP_CMDLINE.*$:DESKTOP_CMDLINE=\!openbox-session:" ${BOOT_USER} || die "unable to set DESKTOP_CMDLINE"
oblog "Apply change to the boot-user@{NEWUSER} service"
66-enable -zv3 -t ${NEWUSER}-session -F boot-user@${NEWUSER} || die "unable to apply ${NEWUSER}-session changes"
oblog "Create tree graphics for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "66-tree -zv3 -Ecn graphics" || die "unable to create graphics tree"
oblog "Enable xdg-user-dirs, dbus-session@${NEWUSER} on tree graphics"
66-enable -zv3 -t boot-user -F boot-user@${NEWUSER} || die "unable to apply boot-user changes"
}
config_tree_base_user(){
oblog "Create base tree for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "66-tree -zv3 -Ecn base" || die "unable to create base tree"
}
config_enable_base_user(){
oblog "Enable xdg-user-dirs, dbus-session@${NEWUSER} on base tree"
su "${NEWUSER}" -c "66-enable -zv3 xdg-user-dirs dbus-session@${NEWUSER}" || die "unable to enable xdg-user-dirs dbus-session@${NEWUSER} service"
}
custo_once config_66
custo_once config_tree_boot
custo_once config_enable_boot
custo_once config_tree_root
custo_once config_enable_root
custo_once config_tree_boot_user
custo_once config_enable_boot_user
custo_once config_tree_base_user
custo_once config_enable_base_user
oblog "Customization terminate"
......@@ -55,18 +55,20 @@ create_log_user(){
}
custo_once create_log_user
config_66(){
config_tree_boot(){
oblog "Create [boot] tree"
oblog "Create [boot] tree"
out_progress "Starting ..."
#sleep 2
66-tree -zv3 -n boot || die "unable to create [boot] tree"
out_progress "Done"
#sleep 1
}
config_enable_boot(){
oblog "Enable (boot@system) service to [boot] tree"
oblog "Enable (boot@system) service to [boot] tree"
out_progress "Starting ..."
#sleep 2
......@@ -97,33 +99,42 @@ config_66(){
66-enable -zv3 -t boot -F boot@system || die "unable to apply boot changes"
out_progress "Done"
}
config_tree_root(){
oblog "Create and enable [root] tree"
out_progress "Starting ..."
#sleep 2
66-tree -zv3 -En root || die "unable to create [root] tree"
out_progress "Done"
#sleep 1
}
config_enable_root(){
oblog "Enable (dbus) (networkmanager) (sddm) (consolekit) services to [root] tree"
oblog "Enable (dbus) (networkmanager) (sddm) (consolekit) services to [root] tree"
out_progress "Starting ..."
#sleep 2
66-enable -zv3 -t root dbus networkmanager sddm consolekit || die "unable to enable (dbus) (networkmanager) (sddm) (consolekit) to [root] tree"
out_progress "Done"
#sleep 1
}
oblog "Create and enable [${NEWUSER}-session] tree"
config_tree_boot_user(){
oblog "Create and enable [${NEWUSER}-session] tree"
out_progress "Starting ..."
#sleep 2
66-tree -zv3 -nE ${NEWUSER}-session || die "unable to create [${NEWUSER}-session] tree"
out_progress "Done"
#sleep 1
}
config_enable_boot_user(){
oblog "Configure and enable (boot-user@${NEWUSER}) service to [${NEWUSER}-session] tree"
out_progress "Starting ..."
......@@ -149,49 +160,42 @@ config_66(){
66-enable -zv3 -t ${NEWUSER}-session -F boot-user@${NEWUSER} || die "unable to apply (${NEWUSER}-session) changes"
out_progress "Done"
oblog "Create and enable [system] tree"
}
config_tree_system(){
oblog "Create and enable [system] tree"
out_progress "Starting ..."
#sleep 2
66-tree -zv3 -ncE system || die "unable to create [system] tree"
out_progress "Done"
#sleep 1
}
oblog "Enable (sshd) service to [system] tree"
config_enable_system(){
oblog "Enable (sshd) service to [system] tree"
out_progress "Starting ..."
#sleep 2
66-enable -zv3 -t system sshd || die "unable to enable (sshd) to [root] tree"
out_progress "Done"
#sleep 1
# oblog "Create and enable [desktop] tree. Set it as the current tree"
# out_progress "Starting ..."
# sleep 2
# 66-tree -v3 -nEc desktop
# out_progress "Done"
# sleep 1
# oblog "Enable (dbus) (networkmanager) (sddm) (consolekit) services to [desktop] tree"
# out_progress "Starting ..."
# sleep 2
# 66-enable -v3 -t desktop dbus networkmanager sddm consolekit
}
# out_progress "Done"
# sleep 1
config_tree_base_user(){
oblog "For ${NEWUSER}: Create and enable [${NEWUSER}] tree. Set it as the current user tree"
oblog "For ${NEWUSER}: Create and enable [${NEWUSER}] tree. Set it as the current user tree"
out_progress "Starting ..."
# sleep 2
su "${NEWUSER}" -c "66-tree -zv3 -nEc ${NEWUSER}"
out_progress "Done"
#sleep 1
}
config_enable_base_user(){
oblog "Enable (xdg-user-dirs) (dbus-session@${NEWUSER}) services to [${NEWUSER}] tree"
out_progress "Starting ..."
......@@ -199,8 +203,17 @@ config_66(){
su "${NEWUSER}" -c "66-enable -zv3 xdg-user-dirs dbus-session@${NEWUSER}"
out_progress "Done"
#sleep 1
}
custo_once config_66
custo_once config_tree_boot
custo_once config_enable_boot
custo_once config_tree_root
custo_once config_enable_root
custo_once config_tree_boot_user
custo_once config_enable_boot_user
custo_once config_tree_system
custo_once config_enable_system
custo_once config_tree_base_user
custo_once config_enable_base_user
oblog "Configuration completed"
......@@ -51,6 +51,100 @@ create_log_user(){
}
custo_once create_log_user
config_tree_boot(){
oblog "Create tree boot"
66-tree -zv3 -n boot || die "unable to create boot tree"
}
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"
## 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.
BOOT_CONF="$(readlink /etc/66/conf/boot@system/version)"
BOOT_CONF="${BOOT_CONF}/boot@system"
oblog "Configure boot@system service"
sed -i "s:^HOSTNAME.*$:HOSTNAME=\!${HOSTNAME}:" ${BOOT_CONF} || die "unable to set HOSTANME"
sed -i "s:^KEYMAP.*$:KEYMAP=\!${KEYMAP}:" ${BOOT_CONF} || die "unable to set KEYMAP"
sed -i "s:^TZ.*$:TZ=${ZONE}/${SUBZONE}:" ${BOOT_CONF} || die "unable to set TZ"
oblog "Apply change to the boot@system service"
66-enable -zv3 -t boot -F boot@system || die "unable to apply boot changes"
}
config_tree_root(){
oblog "Create tree root and enable it"
66-tree -zv3 -cnE root || die "unable to create root tree"
}
config_enable_root(){
oblog "Enable sddm, consolekit, dbus, openntpd, networkmanager and wpa_supplicant on tree root"
66-enable -zv3 sddm consolekit dbus openntpd networkmanager wpa_supplicant || die "unable to enable dbus openntpd connmand wpa_supplicant"
}
config_tree_boot_user(){
oblog "Create boot-user tree"
66-tree -zv3 -En boot-user || die "unable to create boot-user tree"
}
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"
BOOT_USER="$(readlink /etc/66/conf/boot-user@${NEWUSER}/version)"
BOOT_USER="${BOOT_USER}/boot-user@${NEWUSER}"
oblog "Configure boot-user@${NEWUSER} service"
sed -i "s:^DESKTOP_CMDLINE.*$:DESKTOP_CMDLINE=\!xfce4-session:" ${BOOT_USER} || die "unable to set DESKTOP_CMDLINE"
oblog "Apply change to the boot-user@{NEWUSER} service"
66-enable -zv3 -t boot-user -F boot-user@${NEWUSER} || die "unable to apply boot-user changes"
}
config_tree_base_user(){
oblog "Create base tree for ${NEWUSER}, enables and makes it current"
su "${NEWUSER}" -c "66-tree -zv3 -Ecn base" || die "unable to create base tree"
}
config_enable_base_user(){
oblog "Enable xdg-user-dirs, dbus-session@${NEWUSER} on base tree"
su "${NEWUSER}" -c "66-enable -zv3 xdg-user-dirs dbus-session@${NEWUSER}" || die "unable to enable xdg-user-dirs dbus-session@${NEWUSER} service"
}
custo_once config_tree_boot
custo_once config_enable_boot
custo_once config_tree_root
custo_once config_enable_root
custo_once config_tree_boot_user
custo_once config_enable_boot_user
custo_once config_tree_base_user
custo_once config_enable_base_user
config_66(){
oblog "Create tree boot"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment