distro: add some install hooks

This commit is contained in:
Matheus
2025-09-12 19:28:39 -03:00
parent b4e6540f43
commit 9c4169bb0b
9 changed files with 54 additions and 10 deletions
+5
View File
@@ -1,3 +1,8 @@
JINX_MAJOR_VER=0.6
export CFLAGS="-O2 -march=x86-64 -pipe -mtune=generic"
export CXXFLAGS="${CFLAGS}"
copy_install_hook () {
cp -v ${base_dir}/install-hooks/${name} ${dest_dir}/INSTALL
chmod +x ${dest_dir}/INSTALL
}
+1
View File
@@ -21,5 +21,6 @@ chmod 1777 /tmp/.X11-unix
# do first time boot configuration if needed
if [ ! -f "/var/lib/.first_boot_done" ]; then
echo rc: running first boot script
/usr/libexec/astral/first-boot
fi
+3 -10
View File
@@ -1,19 +1,12 @@
#!/usr/bin/bash
# this file will be executed on the first boot of the system
echo first-boot: running first boot script...
# create some directories needed in case they have not been already
echo first-boot: creating /var directories...
mkdir -p /var/log
mkdir -p /var/run
mkdir -p /var/lib
# run post install hooks
echo first-boot: running post install hooks...
echo first-boot: running post install hooks
mkdir -p /var/log
xbps-reconfigure -a > /var/log/first_install_reconfigure.log
# all done
touch /var/lib/.first_boot_done
echo first-boot: syncing disks...
echo first-boot: syncing disks
sync
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/bash
case "$1" in
pre)
;;
post)
mkdir -p /var/log
mkdir -p /var/run
mkdir -p /var/lib
;;
esac
exit 0
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/bash
case "$1" in
pre)
;;
post)
chmod 4755 /usr/bin/passwd
chmod 4755 /bin/su
chmod 4755 /usr/bin/chsh
chmod 4755 /usr/bin/chfn
;;
esac
exit 0
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/bash
case "$1" in
pre)
;;
post)
chmod 4755 /usr/bin/sudo
;;
esac
exit 0
+2
View File
@@ -22,4 +22,6 @@ package() {
ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/root/DOOM1.WAD
ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/home/astral/DOOM1.WAD
ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/etc/skel/DOOM1.WAD
copy_install_hook
}
+1
View File
@@ -22,4 +22,5 @@ build() {
package() {
make install DESTDIR=${dest_dir}
copy_install_hook
}
+2
View File
@@ -21,4 +21,6 @@ package() {
echo "astral ALL=(ALL:ALL) ALL" >> ${dest_dir}/etc/sudoers
chmod ${mode} ${dest_dir}/etc/sudoers
chmod u+s ${dest_dir}/etc/sudoers
copy_install_hook
}