X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=lfs%2Fstage2;h=956f58953c36a8a393af00b4a15bb0b2a12e7950;hp=04291d6e47cb97b3de78ea497c384bbbf288be41;hb=73372ed4e6b573c4a1078b771df4f6623fc79927;hpb=41cfd9e04b1a06d242432e682ab5601f933c0e21 diff --git a/lfs/stage2 b/lfs/stage2 index 04291d6e4..956f58953 100644 --- a/lfs/stage2 +++ b/lfs/stage2 @@ -49,7 +49,7 @@ $(TARGET) : @$(PREBUILD) # Create directories - -mkdir -pv /{bin,boot,etc/opt,etc/modprobe.d,home,lib,mnt,opt} + -mkdir -pv /{bin,boot,etc/opt,etc/modprobe.d,home,lib,mnt,opt,run} -mkdir -pv /{media/{floppy,cdrom,usbkey},sbin,srv,var} -install -dv -m 0750 /root -install -dv -m 1777 /tmp /var/tmp @@ -60,6 +60,9 @@ $(TARGET) : #-for dir in /usr /usr/local; do \ # ln -sv share/{man,doc,info} $$dir; \ #done + + # Symlink /var/run -> /run. + ln -svf ../run /var/run # Symlinks # for this reason, stage2 rebuild will broke the iso:perl, grubbatch @@ -83,7 +86,11 @@ $(TARGET) : [ -f $$i ] && cp $$i /etc/profile.d; \ done chmod 755 /etc/bashrc - ln -svf ../bashrc /etc/profile.d/bashrc.sh + + # Install root's bash files. + for i in $(DIR_SRC)/config/bash/dot_*; do \ + [ -f $$i ] && cp $$i /root/$$(basename $${i/dot_/\.}); \ + done # Scripts for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \ @@ -91,18 +98,28 @@ $(TARGET) : chmod 755 /usr/local/bin/`basename $$i`; \ done + # Move script to correct place. + mv -vf /usr/local/bin/ovpn-ccd-convert /usr/sbin/ + + # Install firewall scripts. + mkdir -pv /usr/lib/firewall + install -m 755 $(DIR_SRC)/config/firewall/rules.pl \ + /usr/lib/firewall/rules.pl + install -m 644 $(DIR_SRC)/config/firewall/firewall-lib.pl \ + /usr/lib/firewall/firewall-lib.pl + # Nobody user -mkdir -p /home/nobody chown -R nobody:nobody /home/nobody # Create /var dirs and files - -mkdir -v /var/{lock,log,mail,run,spool,empty} + -mkdir -v /var/{lock,log,mail,spool,empty} -mkdir -pv /var/{opt,cache,lib/{misc,locate},local} -mkdir -pv /var/log/{counter,calamaris} chown nobody.nobody /var/log/calamaris - touch /var/run/utmp /var/log/{btmp,lastlog,wtmp,net-traffic.log} - chgrp -v utmp /var/run/utmp /var/log/lastlog - chmod -v 664 /var/run/utmp /var/log/lastlog + touch /var/log/{btmp,lastlog,wtmp,net-traffic.log} + chgrp -v utmp /var/log/lastlog + chmod -v 664 /var/log/lastlog # Permissions chmod 0711 /var/empty @@ -114,4 +131,11 @@ $(TARGET) : -mkdir -pv /usr/share/doc/licenses/ cp -vf $(DIR_SRC)/doc/COPYING /usr/share/doc/licenses/GPLv3 + # System release + echo "$(SYSTEM_RELEASE)" > /etc/system-release + + # Pakfire + -mkdir -pv /opt/pakfire/db/core + echo "$(PAKFIRE_CORE)" > /opt/pakfire/db/core/mine + @$(POSTBUILD)