mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add root user to emergency shell
This commit is contained in:
parent
fee92fe794
commit
1c06bc1aed
2 changed files with 6 additions and 7 deletions
|
@ -19,19 +19,18 @@ build() {
|
|||
map add_file '/usr/lib/udev/ata_id' '/usr/lib/udev/scsi_id'
|
||||
add_file "/usr/share/archboot/base/init" "/init"
|
||||
map add_dir /mnt /cdrom
|
||||
map add_file /etc/bash.bash_logout /etc/bash.bashrc /etc/profile /etc/shells
|
||||
# add default bash setup
|
||||
for i in .bashrc .bash_profile .bash_logout; do
|
||||
add_file "/etc/skel/${i}" "/root/${i}"
|
||||
done
|
||||
map add_file /etc/bash.bash_logout /etc/bash.bashrc
|
||||
# add custom bash options
|
||||
echo ". /etc/profile.d/custom-bash-options.sh" >> "$BUILDROOT/root/.bashrc"
|
||||
echo ". /etc/profile.d/custom-bash-options.sh" >> "$BUILDROOT/etc/bash.bashrc"
|
||||
echo "root:x:0:root" > "$BUILDROOT/etc/group"
|
||||
echo "root:x:0:0:/root:/bin/bash" > "$BUILDROOT/etc/passwd"
|
||||
add_file "/usr/share/archboot/base/etc/profile.d/custom-bash-options.sh" \
|
||||
"/etc/profile.d/custom-bash-options.sh"
|
||||
basic_config="os-release hostname modprobe.d/modprobe.conf"
|
||||
for i in $basic_config; do
|
||||
add_file "/usr/share/archboot/base/etc/${i}" "/etc/${i}"
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
help() {
|
||||
|
|
|
@ -52,7 +52,7 @@ if ! [[ -f "/mnt/boot/initramfs-$(uname -m).img" ]] ; then
|
|||
echo -e "\e[1mStep 3/4:\e[m Searching for archboot rootfs on cdrom device..."
|
||||
mount /dev/sr0 /cdrom &>/dev/null
|
||||
if ! mount /cdrom/efi.img /mnt &>/dev/null; then
|
||||
echo -e "\e[1;91mError: Didn't find a device with archboot rootfs\!\e[m"
|
||||
echo -e "\e[1;91mError: Didn't find a device with archboot rootfs! \e[m"
|
||||
echo -e "\e[1mThis needs further debugging. Please contact the archboot author.\e[m"
|
||||
echo -e "\e[1mTobias Powalowski: tpowa@archlinux.org\e[m"
|
||||
echo ""
|
||||
|
|
Loading…
Reference in a new issue