some clean up and commenting

This commit is contained in:
udeved 2015-01-12 18:05:45 +01:00
parent 5a64d1bd8e
commit 0b7bf45b7d
3 changed files with 47 additions and 53 deletions

View file

@ -1,6 +1,6 @@
##############################################
########### manjaro-tools common #############
##############################################
##########################################
################ common ##################
##########################################
# unset defaults to given value
# branch=stable
@ -11,9 +11,9 @@
# cache dir where buildpkg or buildiso cache packages
# cache_dir=/var/cache/manjaro-tools
################################################
########### manjaro-tools buildpkg #############
################################################
##########################################
################ buildpkg ################
##########################################
# custom path to sets
# profiledir=/etc/manjaro-tools/sets
@ -24,7 +24,9 @@
# default set; name without .set extension
# profile=default
############ eudev specific ###############
############# eudev specific #############
# This is only useful if you compile packages against eudev
# default packages to trigger blacklist
# blacklist_trigger=('eudev' 'lib32-eudev' 'upower-pm-utils' 'eudev-systemdcompat' 'lib32-eudev-systemdcompat')
@ -32,17 +34,18 @@
# default blacklisted packages to remove from chroot
# blacklist=('libsystemd')
################################################
########### manjaro-tools buildiso #############
################################################
##########################################
################ buildiso ################
##########################################
# default work dir
# default work dir where the image chroots are located
# work_dir=/opt/buildiso
# default iso target dir
# default iso target dir where the iso file will be stored
# target_dir=/opt/manjaro-iso
################ iso settings ################
##########################################
############## iso settings ##############
# unset defaults to given value
# iso_label="MJRO090"
@ -50,9 +53,6 @@
# unset defaults to given value
# iso_version=0.9.0
# unset defaults to given value
# manjaro_kernel="linux317"
# unset defaults to given value, specify a date here of have it automatically set
# manjaro_version="$(date +%Y.%m)"
@ -69,10 +69,18 @@
# install_dir=manjaro
# unset defaults to given value
# plymouth_theme=manjaro-elegant
# compression=xz
################ install ################
# These settings are inherited in live session
# Settings will be installed
# unset defaults to given value
# compression=xz
# manjaro_kernel="linux317"
# unset defaults to given value
# plymouth_theme=manjaro-elegant
# unset defaults to given values
# names must match systemd service names
@ -82,7 +90,10 @@
# names must match openrc service names
# start_openrc=('cronie' 'cupsd' 'metalog' 'dbus' 'consolekit' 'acpid')
########### livecd setup #############
################# livecd #################
# These settings are specific to live session
# Settings will not be installed
# unset defaults to given value
# hostname="manjaro"

View file

@ -14,19 +14,19 @@ gen_pw(){
}
# $1: chroot
configure_machine_id(){
# set unique machine-id
msg2 "Setting machine-id ..."
if [[ -z "$(echo $1 | grep root-image)" ]];then
chroot $1 dbus-uuidgen --ensure=/etc/machine-id
chroot $1 dbus-uuidgen --ensure=/var/lib/dbus/machine-id
else
mkdir -p $1/etc
mkdir -p $1/var/lib/dbus
dbus-uuidgen --ensure=$1/etc/machine-id
dbus-uuidgen --ensure=$1/var/lib/dbus/machine-id
fi
}
# configure_machine_id(){
# # set unique machine-id
# msg2 "Setting machine-id ..."
# if [[ -z "$(echo $1 | grep root-image)" ]];then
# chroot $1 dbus-uuidgen --ensure=/etc/machine-id
# chroot $1 dbus-uuidgen --ensure=/var/lib/dbus/machine-id
# else
# mkdir -p $1/etc
# mkdir -p $1/var/lib/dbus
# dbus-uuidgen --ensure=$1/etc/machine-id
# dbus-uuidgen --ensure=$1/var/lib/dbus/machine-id
# fi
# }
# $1: chroot
configure_user(){
@ -414,9 +414,7 @@ configure_livecd_image(){
configure_calamares "$1"
${auto_svc_conf} && configure_services_live "$1"
# configure_machine_id "$1"
configure_hostname "$1"
configure_hosts "$1"
@ -515,22 +513,7 @@ make_root_image() {
msg "Prepare [Base installation] (root-image)"
# configure_machine_id "${work_dir}/root-image"
# mkdir -p "${work_dir}/root-image"/etc
# mkdir -p "${work_dir}/root-image"/var/lib/dbus
# ln -sf /etc/machine-id "${work_dir}/root-image"/var/lib/dbus/machine-id
# cp /etc/machine-id "${work_dir}/root-image"/etc/machine-id
# cp "${work_dir}/root-image"/etc/machine-id "${work_dir}/root-image"/var/lib/dbus/machine-id
mkiso ${create_args[*]} -p "${packages}" -i "root-image" create "${work_dir}" || die "Please check you Packages file! Exiting."
# cp /etc/machine-id "${work_dir}/root-image"/etc/machine-id
# cp /etc/machine-id "${work_dir}/root-image"/var/lib/dbus/machine-id
# cp "${work_dir}/root-image"/etc/machine-id "${work_dir}/root-image"/var/lib/dbus/machine-id
# configure_machine_id "${work_dir}/root-image"
pacman -Qr "${work_dir}/root-image" > "${work_dir}/root-image/root-image-pkgs.txt"

View file

@ -170,7 +170,7 @@ load_config(){
[[ -r ${manjaro_tools_conf} ]] && source ${manjaro_tools_conf}
######################
# manjaro-tools common
# common
######################
if [[ -n ${branch} ]];then
@ -192,7 +192,7 @@ load_config(){
fi
###################
# manjaro-tools-pkg
# buildpkg
###################
if [[ -n ${profiledir} ]];then
@ -226,7 +226,7 @@ load_config(){
fi
###################
# manjaro-tools-iso
# buildiso
###################
if [[ -n ${work_dir} ]];then