xbps-casper: use getty from busybox if found, use /bin/sh for live user.

This commit is contained in:
Juan RP 2012-01-30 15:30:41 +01:00
parent d4ee89d9c6
commit 336a25f06f
4 changed files with 17 additions and 12 deletions

View File

@ -7,9 +7,15 @@ for opt in "$@" ; do
fi fi
done done
if [ "$autologin" = "1" ] ; then if [ -x /sbin/agetty ]; then
exec /sbin/agetty -n -l /sbin/casper-login $* mygetty=/sbin/agetty
else elif [ -x /sbin/getty ]; then
exec /sbin/agetty $* mygetty=/sbin/getty
fi
if [ "$autologin" = "1" ] ; then
exec ${mygetty} -n -l /sbin/casper-login $*
else
exec ${mygetty} $*
fi fi

View File

@ -22,7 +22,8 @@ log_begin_msg "$DESCRIPTION"
# U6aMy0wojraho is just a blank password # U6aMy0wojraho is just a blank password
chroot ${rootmnt} useradd -c "$USERFULLNAME" -m $USERNAME \ chroot ${rootmnt} useradd -c "$USERFULLNAME" -m $USERNAME \
-G audio,video,wheel -p U6aMy0wojraho -G audio,video,wheel -p U6aMy0wojraho \
-s ${USERNAME_SHELL:-/bin/sh}
if [ -f ${rootmnt}/etc/sudoers ]; then if [ -f ${rootmnt}/etc/sudoers ]; then
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${rootmnt}/etc/sudoers echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${rootmnt}/etc/sudoers
fi fi

View File

@ -21,9 +21,9 @@ esac
log_begin_msg "$DESCRIPTION" log_begin_msg "$DESCRIPTION"
# Enable autologin for getty(1). # Enable autologin for getty(1).
if [ -f ${rootmnt}//lib/systemd/system/getty@.service ]; then if [ -f ${rootmnt}/lib/systemd/system/getty@.service ]; then
sed -i -e "s|agetty|casper-getty|g" \ sed -i -e "s|/sbin/agetty|/sbin/casper-getty|g" \
${rootmnt}//lib/systemd/system/getty@.service ${rootmnt}/lib/systemd/system/getty@.service
fi fi
# Configure GDM autologin # Configure GDM autologin

View File

@ -1,11 +1,10 @@
# Template file for 'xbps-casper' # Template file for 'xbps-casper'
pkgname=xbps-casper pkgname=xbps-casper
_localver=0.22 # XBPS package version _localver=0.23 # XBPS package version
_distver=1.236 # This should match the upstream (Ubuntu) version _distver=1.236 # This should match the upstream (Ubuntu) version
version=${_localver}.${_distver} version=${_localver}.${_distver}
short_desc="Run a live preinstalled system from read-only media" short_desc="Run a live preinstalled system from read-only media"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
checksum=b31983b27630b3ef99f68bd8382851a7963542c944b625bdbfd2f2ff301a02d3
long_desc=" long_desc="
$pkgname is a modified version of Ubuntu's casper, that is able $pkgname is a modified version of Ubuntu's casper, that is able
to run a live pre-installed system from read-only media." to run a live pre-installed system from read-only media."
@ -17,8 +16,7 @@ conf_files="/etc/casper.conf"
Add_dependency full udev ">=174" # no path_id anymore Add_dependency full udev ">=174" # no path_id anymore
Add_dependency full initramfs-tools Add_dependency full initramfs-tools
do_install() do_install() {
{
# /etc config files # /etc config files
vinstall ${FILESDIR}/casper.conf 644 etc vinstall ${FILESDIR}/casper.conf 644 etc