1 # hdw - linux 00-copy-system-files package
3 # author: hackbard@hackdaworld.dyndns.org
12 # copy /etc configuration files
13 for i in ${hdw_home_dir}/misc/sysfiles/etc/*; do
16 chmod 644 $root/etc/`basename $i`
21 chmod 600 $root/etc/shadow
22 chmod 755 $root/etc/initscript
23 chown 0:3 $root/etc/shadow
26 cp -v ${hdw_home_dir}/misc/sysfiles/etc/conf/[!C]* $root/etc/conf
27 chmod 644 $root/etc/conf/*
30 echo "creating fstab ..."
31 for part in `cat /proc/swaps | grep '^/dev/' | awk '{ print $1 }'`; do
32 echo -e "${part}\tswap\t\tswap\tdefaults 0 0" >> \
37 [ ! -s $root/etc/mtab ] && ln -sfv ../proc/mounts $root/etc/mtab
40 # utmp, wtmp and btmp file
41 touch $root/var/run/utmp $root/var/log/{btmp,lastlog,wtmp} &&
42 chmod 644 $root/var/run/utmp $root/var/log/{btmp,lastlog,wtmp}
44 # compile and install btee (made from Clifford Wolf for
45 # ROCK Linux http://www.rocklinux.org)
46 pre_gcc="" ; [ "$hdw_use_dietlibc" = "1" ] && pre_gcc="diet"
47 $pre_gcc gcc -Wall -O2 $hdw_home_dir/misc/hdw-tools/btee.c -o \
50 # copy over hdw-get script
51 cp -v $hdw_home_dir/misc/hdw-tools/hdw-get $root/usr/bin
52 chown 0:0 $root/usr/bin/hdw-get
53 chmod 750 $root/usr/bin/hdw-get
54 # hdw-get package info
55 cp -v $hdw_home_dir/misc/hdw-tools/hdw-get.db $root/etc
56 # create /etc/hdw-get.conf
57 cat > $root/etc/hdw-get.conf <<-EOF
58 # hdw - linux hdw-get.conf file
59 # keep track of version, downloadlocation and chosen installation media
61 net_addr="http://hdwlinux.org/download"
62 hdw_version="$hdw_version"
63 hdw_arch="$hdw_arch" ;hdw_arch_opt="${hdw_arch_opt}"
64 # bin_dir="${hdw_home_dir}/binaries/${hdw_arch}-${hdw_arch_opt}"