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