Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize zsh caches so first startup on Live CD is faster #208

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions etc/grml/fai/config/scripts/RELEASE/98-clean-chroot
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,20 @@ $ROOTCMD chown "${USERNAME}:${USERNAME}" "/home/${USERNAME}"
echo "Syncing /home/${USERNAME}/ with data from /etc/skel/:"
$ROOTCMD su -s /bin/sh "${USERNAME}" -c "rsync -Hav /etc/skel/ /home/${USERNAME}/"


# Initialize zsh caches so first startup on Live CD is faster.
echo "exit" | $ROOTCMD zsh -l -s -i
echo "exit" | $ROOTCMD setpriv --reuid="${USERNAME}" --regid="${USERNAME}" --clear-groups --reset-env zsh -l -s -i

echo "Listing homedir of user root:"
ls -la "$target"/root
echo "Listing homedir of user ${USERNAME}:"
ls -la "$target"/home/"${USERNAME}"

# "assert" zcompdump was created.
echo "Checking existence of /root/.zcompdump and /home/${USERNAME}/.zcompdump"
ls -la "$target"/root/.zcompdump
ls -la "$target"/home/"${USERNAME}"/.zcompdump
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep all of the ls -la?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah maybe only the ones with .zcompdump. it also serves as an assert the cache got written.

or should i remove all of them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah makes sense! hm, maybe let's keep all of them, though maybe also report upfront which files/directories we're listing to make it more obvious what's going on? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed, please check :)


## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
Loading