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

Ensure files are copied with fcopy into chroot with expected permissions #217

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion etc/grml/fai/config/hooks/updatebase.GRMLBASE
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if ! [ -e "${target}"/etc/udev/kernel-upgrade ] ; then
fi

# install all apt related files
fcopy -i -B -v -r /etc/apt
fcopy -M -i -B -v -r /etc/apt

# install packages from a repository of a specific date
if [ -n "${WAYBACK_DATE:-}" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/20-sudo
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

fcopy -v /etc/sudoers
fcopy -m root,root,0440 -v /etc/sudoers
sed -i "s/\$USERNAME/$USERNAME/" "$target"/etc/sudoers
chmod 440 "$target"/etc/sudoers
chown 0:0 "$target"/etc/sudoers
Expand Down
4 changes: 2 additions & 2 deletions etc/grml/fai/config/scripts/GRMLBASE/25-locales
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ target=${target:?}

# set up /etc/locale.gen, GRMLBASE installs a minimal configuration.
# Only if the LOCALES class is added you get a fuller set of locales.
fcopy -v /etc/locale.gen
fcopy -M -v /etc/locale.gen

# set up /etc/locale.conf, to avoid systemd-firstboot prompting for user input
fcopy -v /etc/locale.conf
fcopy -M -v /etc/locale.conf

# get rid of locales unless using class LOCALES
set +u
Expand Down
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/26-console-setup
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u
set -e

fcopy -v /etc/default/console-setup
fcopy -M -v /etc/default/console-setup

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/30-fstab
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

fcopy -v /etc/fstab
fcopy -M -v /etc/fstab
sed -i "s/uid=USERNAME,gid=USERNAME/uid=$USERNAME,gid=$USERNAME/" "$target"/etc/fstab

## END OF FILE #################################################################
Expand Down
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/31-motd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u
set -e

fcopy -v /etc/motd
fcopy -M -v /etc/motd

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/34-hosts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

fcopy -v /etc/hosts
fcopy -M -v /etc/hosts

# replace $HOSTNAME with the real hostname:
sed -i "s/\$HOSTNAME/$HOSTNAME/" "$target"/etc/hosts
Expand Down
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/35-network
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u
set -e

fcopy -v /etc/network/interfaces
fcopy -M -v /etc/network/interfaces

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/39-modprobe
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set -e
target=${target:?}

# Install all present modprobe.d configuration files
fcopy -v -i -r /etc/modprobe.d
fcopy -M -v -i -r /etc/modprobe.d

if [ -f "${target}/lib/modprobe.d/50-nfs.conf" ] ; then # nfs-kernel-server >=1:2.6.2-1
echo "Clearing /lib/modprobe.d/50-nfs.conf to avoid automatic kmod/busybox issues"
Expand Down
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/41-modules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u
set -e

fcopy -v /etc/modules
fcopy -M -v /etc/modules

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
6 changes: 3 additions & 3 deletions etc/grml/fai/config/scripts/GRMLBASE/42-branding
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
set -u
set -e

fcopy -v /usr/share/initramfs-tools/scripts/init-top/grml
fcopy -v /usr/share/grml/desktop-bg.png
fcopy -v /usr/share/doc/grml-docs/startpage.html
fcopy -m root,root,0755 -v /usr/share/initramfs-tools/scripts/init-top/grml
fcopy -M -v /usr/share/grml/desktop-bg.png
fcopy -M -v /usr/share/doc/grml-docs/startpage.html

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/43-rsyslog
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u
set -e

fcopy -v /etc/rsyslog.conf
fcopy -M -v /etc/rsyslog.conf

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/51-cloud-init
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -e
# NOTE: this file is relevant only with cloud-init package installed,
# though we install it unconditionally via GRMLBASE class to have it
# available and configured as shipped by Grml ISOs
fcopy -v /etc/cloud/cloud.cfg.d/42_grml.cfg
fcopy -M -v /etc/cloud/cloud.cfg.d/42_grml.cfg

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
6 changes: 3 additions & 3 deletions etc/grml/fai/config/scripts/GRMLBASE/80-initramfs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ set -e
# FAI sets $target, but shellcheck does not know that.
target=${target:?}

fcopy -v /etc/initramfs-tools/hooks/000-udev-shutup
fcopy -v /etc/initramfs-tools/conf.d/xz-compress
fcopy -v /etc/initramfs-tools/modules
fcopy -m root,root,0755 -v /etc/initramfs-tools/hooks/000-udev-shutup
fcopy -M -v /etc/initramfs-tools/conf.d/xz-compress
fcopy -M -v /etc/initramfs-tools/modules

if ! [ -f "$target"/usr/share/initramfs-tools/scripts/live ] ; then
echo "Error: live-boot/-initramfs does not seem to be present, can not create initramfs. Exiting.">&2
Expand Down
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRML_FULL/01-firefox
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u
set -e

fcopy -i -B -v /etc/firefox-esr/firefox-esr.js
fcopy -M -i -B -v /etc/firefox-esr/firefox-esr.js

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