Use volatile storage in live journal

Move some livecd configuration to a function.
Fix custom-image sed.
This commit is contained in:
Ramon Buldó 2015-09-22 07:36:28 +02:00
parent de30c2bd19
commit 17721a939e
2 changed files with 18 additions and 7 deletions

View file

@ -102,8 +102,8 @@ configure_services(){
msg2 "Setting $svc ..."
chroot $1 systemctl enable $svc &> /dev/null
done
sed -i -e "s/^.*HandleSuspendKey.*/HandleSuspendKey=ignore/" $1/etc/systemd/logind.conf
sed -i -e "s/^.*HandleLidSwitch.*/HandleLidSwitch=ignore/" $1/etc/systemd/logind.conf
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
msg3 "Done configuring [${initsys}]"
;;
*)
@ -349,7 +349,21 @@ configure_sysctl(){
fi
}
# Remove pamac auto-update when the network is up, it causes problems when booting in the livecd
# $1: chroot
configure_systemd_live(){
if [[ ${initsys} == 'systemd' ]];then
msg2 "Configuring systemd for livecd"
sed -i 's/#\(Storage=\)auto/\1volatile/' $1/etc/systemd/journald.conf
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' $1/etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
# Prevent some services to be started in the livecd
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
| tee "${path}/etc/.updated" >"${path}/var/.updated"
fi
}
# Remove pamac auto-update when the network is up, it locks de pacman db when booting in the livecd
# $1: chroot
configure_pamac_live() {
rm -f $1/etc/NetworkManager/dispatcher.d/99_update_pamac_tray
@ -379,6 +393,7 @@ configure_livecd_image(){
configure_accountsservice "$1" "${username}"
configure_user "$1"
configure_services_live "$1"
configure_systemd_live "$1"
configure_calamares "$1"
configure_thus "$1"
configure_pamac_live "$1"

View file

@ -292,10 +292,6 @@ make_image_livecd() {
configure_livecd_image "${path}"
${is_custom_pac_conf} && clean_pacman_conf "${path}"
# Prevent some services to be started in the livecd
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
| tee "${path}/etc/.updated" >"${path}/var/.updated"
umount_image "${path}"
# Clean up GnuPG keys