diff --git a/srcpkgs/xbps-casper/files/bin/casper-getty b/srcpkgs/xbps-casper/files/bin/casper-getty index bc9606c9f07..48cb0c9dc1c 100755 --- a/srcpkgs/xbps-casper/files/bin/casper-getty +++ b/srcpkgs/xbps-casper/files/bin/casper-getty @@ -7,9 +7,15 @@ for opt in "$@" ; do fi done -if [ "$autologin" = "1" ] ; then - exec /sbin/agetty -n -l /sbin/casper-login $* -else - exec /sbin/agetty $* +if [ -x /sbin/agetty ]; then + mygetty=/sbin/agetty +elif [ -x /sbin/getty ]; then + mygetty=/sbin/getty +fi + +if [ "$autologin" = "1" ] ; then + exec ${mygetty} -n -l /sbin/casper-login $* +else + exec ${mygetty} $* fi diff --git a/srcpkgs/xbps-casper/files/scripts/casper-bottom/10adduser b/srcpkgs/xbps-casper/files/scripts/casper-bottom/10adduser index 7d58f823b2b..bc852b770ba 100755 --- a/srcpkgs/xbps-casper/files/scripts/casper-bottom/10adduser +++ b/srcpkgs/xbps-casper/files/scripts/casper-bottom/10adduser @@ -22,7 +22,8 @@ log_begin_msg "$DESCRIPTION" # U6aMy0wojraho is just a blank password 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 echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${rootmnt}/etc/sudoers fi diff --git a/srcpkgs/xbps-casper/files/scripts/casper-bottom/15autologin b/srcpkgs/xbps-casper/files/scripts/casper-bottom/15autologin index 3c629d74a0a..7ba79641d2c 100755 --- a/srcpkgs/xbps-casper/files/scripts/casper-bottom/15autologin +++ b/srcpkgs/xbps-casper/files/scripts/casper-bottom/15autologin @@ -21,9 +21,9 @@ esac log_begin_msg "$DESCRIPTION" # Enable autologin for getty(1). -if [ -f ${rootmnt}//lib/systemd/system/getty@.service ]; then - sed -i -e "s|agetty|casper-getty|g" \ - ${rootmnt}//lib/systemd/system/getty@.service +if [ -f ${rootmnt}/lib/systemd/system/getty@.service ]; then + sed -i -e "s|/sbin/agetty|/sbin/casper-getty|g" \ + ${rootmnt}/lib/systemd/system/getty@.service fi # Configure GDM autologin diff --git a/srcpkgs/xbps-casper/template b/srcpkgs/xbps-casper/template index f14b9e46c09..e9c4c2f0fba 100644 --- a/srcpkgs/xbps-casper/template +++ b/srcpkgs/xbps-casper/template @@ -1,11 +1,10 @@ # Template file for '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 version=${_localver}.${_distver} short_desc="Run a live preinstalled system from read-only media" maintainer="Juan RP " -checksum=b31983b27630b3ef99f68bd8382851a7963542c944b625bdbfd2f2ff301a02d3 long_desc=" $pkgname is a modified version of Ubuntu's casper, that is able 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 initramfs-tools -do_install() -{ +do_install() { # /etc config files vinstall ${FILESDIR}/casper.conf 644 etc