upstream debugflags from arm-sdk
This commit is contained in:
parent
904c4527ab
commit
162d058cf1
|
|
@ -32,4 +32,11 @@ source $LIBPATH/zlibs/sysconf
|
|||
vars+=(libdevuansdk_version)
|
||||
vars+=(LIBPATH)
|
||||
|
||||
if [[ $DEBUG -gt 0 ]]; then
|
||||
cp="/bin/cp -v"
|
||||
else
|
||||
cp="/bin/cp"
|
||||
setopt pushdsilent
|
||||
fi
|
||||
|
||||
act "libdevuansdk v$libdevuansdk_version loaded"
|
||||
|
|
|
|||
|
|
@ -52,18 +52,18 @@ bootstrap_complete_base() {
|
|||
|
||||
## write all system configuration
|
||||
notice "writing system configuration"
|
||||
conf_print_debconf | sudo tee $strapdir/debconf.set
|
||||
conf_print_fstab | sudo tee $strapdir/etc/fstab
|
||||
conf_print_hostname | sudo tee $strapdir/etc/hostname
|
||||
conf_print_hosts | sudo tee $strapdir/etc/hosts
|
||||
conf_print_networkifaces | sudo tee $strapdir/etc/network/interfaces
|
||||
conf_print_resolvconf | sudo tee $strapdir/etc/resolv.conf
|
||||
conf_print_sourceslist | sudo tee $strapdir/etc/apt/sources.list
|
||||
conf_print_locales | sudo tee $strapdir/etc/profile.d/locales.sh
|
||||
conf_print_debconf | sudo tee $strapdir/debconf.set >/dev/null
|
||||
conf_print_fstab | sudo tee $strapdir/etc/fstab >/dev/null
|
||||
conf_print_hostname | sudo tee $strapdir/etc/hostname >/dev/null
|
||||
conf_print_hosts | sudo tee $strapdir/etc/hosts >/dev/null
|
||||
conf_print_networkifaces | sudo tee $strapdir/etc/network/interfaces >/dev/null
|
||||
conf_print_resolvconf | sudo tee $strapdir/etc/resolv.conf >/dev/null
|
||||
conf_print_sourceslist | sudo tee $strapdir/etc/apt/sources.list >/dev/null
|
||||
conf_print_locales | sudo tee $strapdir/etc/profile.d/locales.sh >/dev/null
|
||||
|
||||
## write third-stage for chroot
|
||||
bootstrap_config_thirdstage | sudo tee $strapdir/thirdstage
|
||||
bootstrap_config_cleanup | sudo tee $strapdir/cleanup
|
||||
bootstrap_config_thirdstage | sudo tee $strapdir/thirdstage >/dev/null
|
||||
bootstrap_config_cleanup | sudo tee $strapdir/cleanup >/dev/null
|
||||
|
||||
## chroot into it and configure further
|
||||
## debootstrap stage 3
|
||||
|
|
@ -129,7 +129,7 @@ bootstrap_tar_pack() {
|
|||
#for i in $custmodules;do sudo sed -i -e '/'$i'/d' $strapdir/etc/modules;done
|
||||
#[[ -n $inittab ]] && sudo sed -i -e '/'$inittab'/d' $strapdir/etc/inittab
|
||||
|
||||
cat <<EOF | sudo tee ${strapdir}/prepack
|
||||
cat <<EOF | sudo tee ${strapdir}/prepack >/dev/null
|
||||
#!/bin/sh
|
||||
#apt-get --yes --force-yes purge ${extra_packages}
|
||||
apt-get --yes --force-yes autoremove
|
||||
|
|
@ -170,7 +170,7 @@ bootstrap_tar_unpack() {
|
|||
sudo mkdir -p ${unpath}/{boot,dev,sys,proc}
|
||||
}
|
||||
|
||||
cat <<EOF | sudo tee ${strapdir}/postunpack
|
||||
cat <<EOF | sudo tee ${strapdir}/postunpack >/dev/null
|
||||
#!/bin/sh
|
||||
apt-get update
|
||||
apt-get --yes --force-yes upgrade
|
||||
|
|
@ -185,8 +185,8 @@ EOF
|
|||
devprocsys umount $strapdir
|
||||
|
||||
## below typically used in arm-sdk
|
||||
[[ -z $inittab ]] || { print $inittab | sudo tee -a $strapdir/etc/inittab }
|
||||
[[ -z $inittab ]] || { print $inittab | sudo tee -a $strapdir/etc/inittab >/dev/null }
|
||||
for i in $custmodules; do
|
||||
print $i | sudo tee -a $strapdir/etc/modules
|
||||
print $i | sudo tee -a $strapdir/etc/modules >/dev/null
|
||||
done
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ dpkgdivert() {
|
|||
ckreq || return 1
|
||||
|
||||
if [[ $watdo = on ]]; then
|
||||
cat <<EOF | sudo tee ${werdo}/dpkgdivert
|
||||
cat <<EOF | sudo tee ${werdo}/dpkgdivert >/dev/null
|
||||
#!/bin/sh
|
||||
dpkg-divert --add --local \
|
||||
--divert /usr/sbin/invoke-rc.d.chroot \
|
||||
|
|
@ -130,7 +130,7 @@ chmod +x /usr/sbin/policy-rc.d
|
|||
rm -f /dpkgdivert
|
||||
EOF
|
||||
elif [[ $watdo = off ]]; then
|
||||
cat <<EOF | sudo tee ${werdo}/dpkgdivert
|
||||
cat <<EOF | sudo tee ${werdo}/dpkgdivert >/dev/null
|
||||
#!/bin/sh
|
||||
rm -f /usr/sbin/policy-rc.d
|
||||
rm -f /usr/sbin/invoke-rc.d
|
||||
|
|
@ -148,7 +148,7 @@ enableserv() {
|
|||
req=(service strapdir)
|
||||
ckreq || return 1
|
||||
|
||||
cat <<EOF | sudo tee -a ${strapdir}/enserv
|
||||
cat <<EOF | sudo tee -a ${strapdir}/enserv >/dev/null
|
||||
#!/bin/sh
|
||||
update-rc.d ${service} enable
|
||||
EOF
|
||||
|
|
@ -163,7 +163,7 @@ disableserv() {
|
|||
req=(service strapdir)
|
||||
ckreq || return 1
|
||||
|
||||
cat <<EOF | sudo tee -a ${strapdir}/disserv
|
||||
cat <<EOF | sudo tee -a ${strapdir}/disserv >/dev/null
|
||||
#!/bin/sh
|
||||
update-rc.d ${service} disable
|
||||
EOF
|
||||
|
|
@ -178,11 +178,13 @@ enablessh() {
|
|||
ckreq || return 1
|
||||
|
||||
# "hardened" ssh
|
||||
sudo -E sed -i $strapdir/etc/sshd_config \
|
||||
-e 's/PermitRootLogin .*/PermitRootLogin yes/' \
|
||||
-e 's/HostKey .*dsa_key/#&/' \
|
||||
-e 's/X11Forwarding .*/X11Forwarding no/' \
|
||||
-e 's/UsePAM .*/UsePAM no/'
|
||||
#sudo -E sed -i $strapdir/etc/sshd_config \
|
||||
#-e 's/PermitRootLogin .*/PermitRootLogin yes/' \
|
||||
#-e 's/HostKey .*dsa_key/#&/' \
|
||||
#-e 's/X11Forwarding .*/X11Forwarding no/' \
|
||||
#-e 's/UsePAM .*/UsePAM no/'
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
install-custdebs() {
|
||||
|
|
@ -191,9 +193,9 @@ install-custdebs() {
|
|||
ckreq || return 1
|
||||
|
||||
sudo mkdir -p $strapdir/debs
|
||||
sudo cp $CPVERBOSE -f $R/extra/custom-packages/*.deb $strapdir/debs/
|
||||
sudo ${=cp} $R/extra/custom-packages/*.deb $strapdir/debs/
|
||||
|
||||
cat <<EOF | sudo tee ${strapdir}/install-debs
|
||||
cat <<EOF | sudo tee ${strapdir}/install-debs >/dev/null
|
||||
#!/bin/sh
|
||||
for deb in /debs/*.deb; do
|
||||
dpkg -i \$deb
|
||||
|
|
|
|||
16
zlibs/iso
16
zlibs/iso
|
|
@ -28,7 +28,7 @@ iso_prepare_strap() {
|
|||
|
||||
notice "preparing strapdir for livecd"
|
||||
|
||||
cat <<EOF | sudo tee ${strapdir}/isoprep
|
||||
cat <<EOF | sudo tee ${strapdir}/isoprep >/dev/null
|
||||
#!/bin/sh
|
||||
apt-get update
|
||||
apt-get --yes --force-yes install dialog live-boot
|
||||
|
|
@ -50,12 +50,12 @@ iso_setup_isolinux() {
|
|||
pushd $workdir
|
||||
sudo mkdir -p binary/{live,isolinux}
|
||||
act "copying kernel and initrd"
|
||||
sudo cp $CPVERBOSE $strapdir/boot/vmlinuz* binary/live/vmlinuz
|
||||
sudo cp $CPVERBOSE $strapdir/boot/initrd* binary/live/initrd
|
||||
sudo ${=cp} $strapdir/boot/vmlinuz* binary/live/vmlinuz
|
||||
sudo ${=cp} $strapdir/boot/initrd* binary/live/initrd
|
||||
|
||||
sudo cp $CPVERBOSE /usr/share/live/build/bootloaders/isolinux/isolinux.bin \
|
||||
sudo ${=cp} /usr/share/live/build/bootloaders/isolinux/isolinux.bin \
|
||||
binary/isolinux
|
||||
sudo cp $CPVERBOSE /usr/share/live/build/bootloaders/isolinux/*.c32 \
|
||||
sudo ${=cp} /usr/share/live/build/bootloaders/isolinux/*.c32 \
|
||||
binary/isolinux
|
||||
popd
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ iso_write_isolinux_cfg() {
|
|||
ckreq || return 1
|
||||
|
||||
notice "writing isolinux configuration"
|
||||
cat <<EOF | sudo tee ${workdir}/binary/isolinux/isolinux.cfg
|
||||
cat <<EOF | sudo tee ${workdir}/binary/isolinux/isolinux.cfg >/dev/null
|
||||
ui vesamenu.c32
|
||||
prompt 0
|
||||
menu title ${os} boot menu
|
||||
|
|
@ -90,7 +90,7 @@ iso_squash_strap() {
|
|||
notice "creating squashfs out of strapdir"
|
||||
|
||||
pushd $workdir
|
||||
sudo mksquashfs $strapdir binary/live/filesystem.squashfs -comp xz -e boot
|
||||
sudo mksquashfs $strapdir binary/live/filesystem.squashfs -comp xz -e boot
|
||||
popd
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ iso_setup_installer() {
|
|||
fn iso_setup_installer
|
||||
|
||||
notice "setting up devuan-installer"
|
||||
sudo cp $CPVERBOSE $R/extra/installer/* $strapdir/
|
||||
sudo ${=cp} $R/extra/installer/* $strapdir/
|
||||
|
||||
## TODO: init to script
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,11 +119,13 @@ conf_print_sourceslist() {
|
|||
deb ${mirror} ${release} ${section}
|
||||
deb ${mirror} ${release}-updates ${section}
|
||||
deb ${mirror} ${release}-security ${section}
|
||||
#deb ${mirror} ${release}-backports ${section}
|
||||
|
||||
## source repositories
|
||||
#deb-src ${mirror} ${release} ${section}
|
||||
#deb-src ${mirror} ${release}-updates ${section}
|
||||
#deb-src ${mirror} ${release}-security ${section}
|
||||
#deb-src ${mirror} ${release}-backports ${section}
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue