Skip to content
Permalink
Browse files

Merge pull request #2521 from sammj/users

Update Petitboot and enable Petitboot privilege separation
  • Loading branch information...
stewart-ibm committed Feb 14, 2019
2 parents 051f2c9 + db6ca35 commit 7b5f1efbee6ace9d4ee80640875aa3ad57e95c69
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -8,3 +8,4 @@ CONFIG_UDHCPC6=y
CONFIG_FEATURE_UDHCPC6_RFC3646=y
CONFIG_FEATURE_UDHCPC6_RFC4704=y
CONFIG_FEATURE_UDHCPC6_RFC4833=y
CONFIG_USE_BB_CRYPT_SHA=y
@@ -9,6 +9,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -34,6 +35,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -7,6 +7,7 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -32,6 +33,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -37,6 +38,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -9,6 +9,7 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -34,6 +35,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -10,6 +10,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -0,0 +1 @@
petituser 1111 petitgroup 2222 - /home/petituser /bin/sh wheel
@@ -10,6 +10,7 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -34,6 +35,8 @@ BR2_PACKAGE_DROPBEAR=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -11,6 +11,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -36,6 +37,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_OPENPOWER_PLATFORM=y
@@ -9,6 +9,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
BR2_ROOTFS_OVERLAY="../openpower/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
@@ -34,6 +35,8 @@ BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_LRZSZ=y
BR2_PACKAGE_NETCAT=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_XZ=y
BR2_OPENPOWER_PLATFORM=y
@@ -0,0 +1,4 @@
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
Defaults targetpw
Defaults timestamp_timeout=1
@@ -15,7 +15,12 @@ fi
case "$1" in
start)
ulimit -c unlimited
mkdir -p $(dirname $LOGFILE)
mkdir -p -m 0775 $(dirname $LOGFILE)
mkdir -p -m 0775 /var/petitboot
# Set permissions for normal users
chown -R root:petitgroup $(dirname $LOGFILE)
chown -R root:petitgroup /var/petitboot

export $(cat /etc/locale)
pb-discover -l $LOGFILE $verbose &
echo $! > $PIDFILE
@@ -1,5 +1,5 @@

# spawn a petitboot UI on common user-visible interface devices
SUBSYSTEM=="tty", KERNEL=="hvc*", RUN+="/usr/libexec/petitboot/pb-console --getty --detach -- -n -i 0 $name linux"
SUBSYSTEM=="tty", KERNEL=="tty0", RUN+="/usr/libexec/petitboot/pb-console --getty --detach -- -n -i 0 $name linux"
SUBSYSTEM=="tty", KERNEL=="ttyS*", RUN+="/usr/libexec/petitboot/pb-console --getty --detach -- -n -i 0 $name linux"
SUBSYSTEM=="tty", KERNEL=="hvc*", RUN+="/usr/libexec/petitboot/pb-console --getty=/sbin/agetty --detach -- -a petituser -n -i $name linux"
SUBSYSTEM=="tty", KERNEL=="tty0", RUN+="/usr/libexec/petitboot/pb-console --getty=/sbin/agetty --detach -- -a petituser -n -i $name linux"
SUBSYSTEM=="tty", KERNEL=="ttyS*", RUN+="/usr/libexec/petitboot/pb-console --getty=/sbin/agetty --detach -- -a petituser -n -i $name linux"
@@ -1 +1 @@
sha256 68c987a9fb8642976f969c2d2b3cf96e3f3efb6df54e7a8855a5f9e4d4b83ff6 petitboot-1.9.2.tar.gz
sha256 ff152b6480fd20717db24aeb7d10f29ab7866656e111103e56ff7f1292b78344 petitboot-1.10.0.tar.gz
@@ -4,7 +4,7 @@
#
################################################################################

PETITBOOT_VERSION = 1.9.2
PETITBOOT_VERSION = 1.10.0
PETITBOOT_SOURCE = petitboot-$(PETITBOOT_VERSION).tar.gz
PETITBOOT_SITE ?= https://github.com/open-power/petitboot/releases/download/v$(PETITBOOT_VERSION)
PETITBOOT_DEPENDENCIES = ncurses udev host-bison host-flex lvm2
@@ -13,6 +13,7 @@ PETITBOOT_LICENSE_FILES = COPYING

PETITBOOT_CONF_OPTS += --with-ncurses --without-twin-x11 --without-twin-fbdev \
--localstatedir=/var \
--enable-crypt \
HOST_PROG_KEXEC=/usr/sbin/kexec \
HOST_PROG_SHUTDOWN=/usr/libexec/petitboot/bb-kexec-reboot \
$(if $(BR2_PACKAGE_BUSYBOX),--with-tftp=busybox --enable-busybox)
@@ -61,7 +62,11 @@ define PETITBOOT_POST_INSTALL
ln -sf /usr/sbin/pb-udhcpc \
$(TARGET_DIR)/usr/share/udhcpc/default.script.d/

mkdir -p $(TARGET_DIR)/var/log/petitboot
mkdir -p $(TARGET_DIR)/home/petituser
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_OP_BUILD_PATH)/package/petitboot/shell_profile \
$(TARGET_DIR)/home/petituser/.profile
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_OP_BUILD_PATH)/package/petitboot/shell_config \
$(TARGET_DIR)/home/petituser/.shrc

$(MAKE) -C $(@D)/po DESTDIR=$(TARGET_DIR) install
endef
@@ -0,0 +1,15 @@
#!bin/sh

reset

echo "Exiting petitboot. Type 'exit' to return."
echo "You may run 'pb-sos' to gather diagnostic data"

if [[ "$(id -u)" != "0" ]]; then
echo "" | sudo -S /bin/true 2&>1 >> /dev/null
if [[ $? = 0 ]]; then
echo "No password set, elevating shell"
sudo -i
exit
fi
fi
@@ -0,0 +1,2 @@
export ENV="/home/petituser/.shrc"
/usr/libexec/petitboot/pb-console

0 comments on commit 7b5f1ef

Please sign in to comment.
You can’t perform that action at this time.