mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 22:48:21 +00:00
distro: add some install hooks
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
JINX_MAJOR_VER=0.6
|
JINX_MAJOR_VER=0.6
|
||||||
export CFLAGS="-O2 -march=x86-64 -pipe -mtune=generic"
|
export CFLAGS="-O2 -march=x86-64 -pipe -mtune=generic"
|
||||||
export CXXFLAGS="${CFLAGS}"
|
export CXXFLAGS="${CFLAGS}"
|
||||||
|
|
||||||
|
copy_install_hook () {
|
||||||
|
cp -v ${base_dir}/install-hooks/${name} ${dest_dir}/INSTALL
|
||||||
|
chmod +x ${dest_dir}/INSTALL
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,5 +21,6 @@ chmod 1777 /tmp/.X11-unix
|
|||||||
|
|
||||||
# do first time boot configuration if needed
|
# do first time boot configuration if needed
|
||||||
if [ ! -f "/var/lib/.first_boot_done" ]; then
|
if [ ! -f "/var/lib/.first_boot_done" ]; then
|
||||||
|
echo rc: running first boot script
|
||||||
/usr/libexec/astral/first-boot
|
/usr/libexec/astral/first-boot
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,19 +1,12 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
# this file will be executed on the first boot of the system
|
# 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
|
# 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
|
xbps-reconfigure -a > /var/log/first_install_reconfigure.log
|
||||||
|
|
||||||
# all done
|
# all done
|
||||||
touch /var/lib/.first_boot_done
|
touch /var/lib/.first_boot_done
|
||||||
|
|
||||||
echo first-boot: syncing disks...
|
echo first-boot: syncing disks
|
||||||
sync
|
sync
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
pre)
|
||||||
|
|
||||||
|
;;
|
||||||
|
post)
|
||||||
|
chmod 4755 /usr/bin/sudo
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -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}/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}/home/astral/DOOM1.WAD
|
||||||
ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/etc/skel/DOOM1.WAD
|
ln -fvs /usr/share/games/doom/DOOM1.WAD ${dest_dir}/etc/skel/DOOM1.WAD
|
||||||
|
|
||||||
|
copy_install_hook
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,4 +22,5 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
make install DESTDIR=${dest_dir}
|
make install DESTDIR=${dest_dir}
|
||||||
|
copy_install_hook
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,4 +21,6 @@ package() {
|
|||||||
echo "astral ALL=(ALL:ALL) ALL" >> ${dest_dir}/etc/sudoers
|
echo "astral ALL=(ALL:ALL) ALL" >> ${dest_dir}/etc/sudoers
|
||||||
chmod ${mode} ${dest_dir}/etc/sudoers
|
chmod ${mode} ${dest_dir}/etc/sudoers
|
||||||
chmod u+s ${dest_dir}/etc/sudoers
|
chmod u+s ${dest_dir}/etc/sudoers
|
||||||
|
|
||||||
|
copy_install_hook
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user