xbps-casper: sync with reality, systemd ready now.
This commit is contained in:
parent
a5b99f522c
commit
c0239a20d5
@ -31,8 +31,7 @@ for x in $(cat /proc/cmdline); do
|
||||
done
|
||||
|
||||
if [ "${set_keymap}" ]; then
|
||||
sed -i -e "s|qwerty/us|qwerty/${keymap}|" \
|
||||
"${rootmnt}/etc/conf.d/keymaps"
|
||||
sed -i -e "s|\(KEYMAP=\)es|\1${keymap}|" ${rootmnt}/etc/vconsole.conf
|
||||
fi
|
||||
|
||||
# Setup keymap for X.org evdev.
|
||||
|
@ -23,6 +23,7 @@ log_begin_msg "$DESCRIPTION"
|
||||
|
||||
cat > $FSTAB <<EOF
|
||||
${UNIONFS} / ${UNIONFS} rw 0 0
|
||||
tmpfs /tmp tmpfs defaults 0 0
|
||||
EOF
|
||||
|
||||
log_end_msg
|
||||
|
@ -31,7 +31,7 @@ for x in $(cat /proc/cmdline); do
|
||||
done
|
||||
|
||||
if [ "${set_locale}" ]; then
|
||||
echo "system_locale=\"$locale\"" > ${rootmnt}/etc/conf.d/locale
|
||||
sed -i -e "s|\(LANG=\).*|LANG=${locale}|" ${rootmnt}/etc/locale.conf
|
||||
fi
|
||||
|
||||
# Setup language in lightdm.
|
||||
|
@ -21,13 +21,14 @@ esac
|
||||
log_begin_msg "$DESCRIPTION"
|
||||
|
||||
# Enable autologin for getty(1).
|
||||
if [ -f "${rootmnt}/etc/inittab" ]; then
|
||||
sed -i -e "s|agetty|casper-getty|g" "${rootmnt}/etc/inittab"
|
||||
if [ -f ${rootmnt}//lib/systemd/system/getty@.service ]; then
|
||||
sed -i -e "s|agetty|casper-getty|g" \
|
||||
${rootmnt}//lib/systemd/system/getty@.service
|
||||
fi
|
||||
|
||||
# Configure GDM autologin
|
||||
if [ -d /root/etc/gdm ]; then
|
||||
GDMCustomFile=/root/etc/gdm/custom.conf
|
||||
if [ -d ${rootmnt}/etc/gdm ]; then
|
||||
GDMCustomFile=${rootmnt}/etc/gdm/custom.conf
|
||||
AutologinParameters="AutomaticLoginEnable=true\nAutomaticLogin=$USERNAME"
|
||||
|
||||
# Prevent from updating if parameters already present (persistent usb key)
|
||||
@ -43,11 +44,11 @@ fi
|
||||
log_end_msg
|
||||
exit 0
|
||||
|
||||
if [ -r /root/etc/lightdm.conf ]; then
|
||||
if [ -r ${rootmnt}/etc/lightdm.conf ]; then
|
||||
sed -i -e "s|^\#\(default-user=\).*|\1$USERNAME|" \
|
||||
/root/etc/lightdm.conf
|
||||
${rootmnt}/etc/lightdm.conf
|
||||
sed -i -e "s|^\#\(default-user-timeout=\).*|\10|" \
|
||||
/root/etc/lightdm.conf
|
||||
${rootmnt}/etc/lightdm.conf
|
||||
fi
|
||||
|
||||
log_end_msg
|
||||
|
@ -20,8 +20,9 @@ esac
|
||||
|
||||
log_begin_msg "$DESCRIPTION"
|
||||
|
||||
echo "hostname=$HOST" > "${rootmnt}/etc/conf.d/hostname"
|
||||
cat > /root/etc/hosts <<EOF
|
||||
echo "$HOST" > "${rootmnt}/etc/hostname"
|
||||
|
||||
cat > ${rootmnt}/etc/hosts <<EOF
|
||||
127.0.0.1 localhost
|
||||
127.0.1.1 $HOST
|
||||
|
||||
|
@ -19,13 +19,13 @@ prereqs)
|
||||
esac
|
||||
|
||||
# Check that polkit is installed.
|
||||
if [ ! -x "/root/usr/libexec/polkitd" ]; then
|
||||
if [ ! -x ${rootmnt}/usr/libexec/polkitd ]; then
|
||||
exit 0
|
||||
fi
|
||||
log_begin_msg "$DESCRIPTION"
|
||||
|
||||
# configure PolicyKit in live session
|
||||
mkdir -p /root/etc/PolicyKit
|
||||
mkdir -p ${rootmnt}/etc/PolicyKit
|
||||
cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
|
||||
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
|
||||
|
||||
@ -46,7 +46,7 @@ cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
|
||||
</config>
|
||||
EOF
|
||||
|
||||
mkdir -p /root/var/lib/polkit-1/localauthority/10-vendor.d
|
||||
mkdir -p ${rootmnt}/var/lib/polkit-1/localauthority/10-vendor.d
|
||||
cat << EOF > /root/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla
|
||||
# Policy to allow the livecd user to bypass policykit
|
||||
[Live CD user permissions]
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Template file for 'xbps-casper'
|
||||
pkgname=xbps-casper
|
||||
_localver=0.17 # XBPS package version
|
||||
_localver=0.18 # XBPS package version
|
||||
_distver=1.236 # This should match the upstream (Ubuntu) version
|
||||
version=${_localver}.${_distver}
|
||||
build_style=custom-install
|
||||
@ -21,19 +21,18 @@ Add_dependency full initramfs-tools
|
||||
do_install()
|
||||
{
|
||||
# /etc config files
|
||||
install -d ${DESTDIR}/etc
|
||||
install -m 644 ${FILESDIR}/casper.conf ${DESTDIR}/etc
|
||||
vinstall ${FILESDIR}/casper.conf 644 etc
|
||||
|
||||
# Helpers
|
||||
install -d ${DESTDIR}/sbin
|
||||
install -m 755 ${FILESDIR}/bin/* ${DESTDIR}/sbin
|
||||
install -m755 ${FILESDIR}/bin/* ${DESTDIR}/sbin
|
||||
|
||||
# initramfs-tools hooks/scripts
|
||||
initramfsdir=${DESTDIR}/usr/share/initramfs-tools
|
||||
install -d ${initramfsdir}/hooks ${initramfsdir}/scripts/casper-bottom
|
||||
install -m 755 ${FILESDIR}/hooks/* ${initramfsdir}/hooks
|
||||
install -m 755 ${FILESDIR}/scripts/casper-bottom/* \
|
||||
install -m755 ${FILESDIR}/hooks/* ${initramfsdir}/hooks
|
||||
install -m755 ${FILESDIR}/scripts/casper-bottom/* \
|
||||
${initramfsdir}/scripts/casper-bottom
|
||||
install -m 644 ${FILESDIR}/scripts/{casper,casper-helpers} \
|
||||
install -m644 ${FILESDIR}/scripts/{casper,casper-helpers} \
|
||||
${initramfsdir}/scripts
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user