clean-system, mirror & suite replacement
This commit is contained in:
25
banana-pi.sh
25
banana-pi.sh
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -275,7 +275,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -290,10 +290,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -301,18 +300,17 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable the serial console
|
# Enable the serial console
|
||||||
echo "T1:12345:respawn:/sbin/agetty -L ttyS0 115200 vt100" >> ${work_dir}/etc/inittab
|
echo "T1:12345:respawn:/sbin/agetty -L ttyS0 115200 vt100" >> ${work_dir}/etc/inittab
|
||||||
# Load the ethernet module since it doesn't load automatically at boot.
|
# Load the ethernet module since it doesn't load automatically at boot.
|
||||||
echo "sunxi_emac" >> ${work_dir}/etc/modules
|
echo "sunxi_emac" >> ${work_dir}/etc/modules
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -413,7 +411,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -285,7 +285,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -300,10 +300,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -311,11 +310,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -413,7 +411,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
bbb.sh
19
bbb.sh
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -291,7 +291,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -306,10 +306,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -317,11 +316,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -539,7 +537,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -274,7 +274,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -289,10 +289,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -300,11 +299,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -742,7 +740,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -278,7 +278,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -293,10 +293,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -304,11 +303,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -649,7 +647,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -271,7 +271,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -286,10 +286,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -297,17 +296,16 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF > ${work_dir}/etc/resolv.conf
|
cat << EOF > ${work_dir}/etc/resolv.conf
|
||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -613,7 +611,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -280,7 +280,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -295,10 +295,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -306,16 +305,15 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Load the ethernet module since it doesn't load automatically at boot.
|
# Load the ethernet module since it doesn't load automatically at boot.
|
||||||
echo "sunxi_emac" >> ${work_dir}/etc/modules
|
echo "sunxi_emac" >> ${work_dir}/etc/modules
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -471,7 +469,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -280,7 +280,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -295,10 +295,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -306,16 +305,15 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Load the ethernet module since it doesn't load automatically at boot.
|
# Load the ethernet module since it doesn't load automatically at boot.
|
||||||
echo "sunxi_gmac" >> ${work_dir}/etc/modules
|
echo "sunxi_gmac" >> ${work_dir}/etc/modules
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -469,7 +467,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
cubox-i.sh
19
cubox-i.sh
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -288,7 +288,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -303,10 +303,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -314,11 +313,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -437,7 +435,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
cubox.sh
19
cubox.sh
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -282,7 +282,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -297,10 +297,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -308,11 +307,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -474,7 +472,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -324,7 +324,7 @@ EOF
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -339,10 +339,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -350,18 +349,16 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable serial console
|
# Enable serial console
|
||||||
echo 'T1:12345:respawn:/sbin/getty -L ttymxc1 115200 vt100' >> \
|
echo 'T1:12345:respawn:/sbin/getty -L ttymxc1 115200 vt100' >> \
|
||||||
${work_dir}/etc/inittab
|
${work_dir}/etc/inittab
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -503,7 +500,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
23
kalitap.sh
23
kalitap.sh
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -280,7 +280,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -295,10 +295,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -306,6 +305,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
||||||
M ttyO0 c 5 1
|
M ttyO0 c 5 1
|
||||||
EOF
|
EOF
|
||||||
@@ -314,13 +319,6 @@ cat << EOF >> ${work_dir}/etc/securetty
|
|||||||
ttyO0
|
ttyO0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -500,7 +498,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
23
luna.sh
23
luna.sh
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -279,7 +279,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -294,10 +294,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -305,6 +304,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
||||||
M ttyO0 c 5 1
|
M ttyO0 c 5 1
|
||||||
EOF
|
EOF
|
||||||
@@ -313,13 +318,6 @@ cat << EOF >> ${work_dir}/etc/securetty
|
|||||||
ttyO0
|
ttyO0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -465,7 +463,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
mini-x.sh
19
mini-x.sh
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -285,7 +285,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -300,10 +300,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -311,11 +310,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -414,7 +412,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up temporary build system"
|
echo "Cleaning up temporary build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
nanopi2.sh
19
nanopi2.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -292,7 +292,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -307,10 +307,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -318,11 +317,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -556,7 +554,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Clean up the build system"
|
echo "Clean up the build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
26
nanopi3.sh
26
nanopi3.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -302,7 +302,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -317,10 +317,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -328,18 +327,16 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF > ${work_dir}/etc/resolv.conf
|
cat << EOF > ${work_dir}/etc/resolv.conf
|
||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -520,7 +517,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Clean up the build system"
|
echo "Clean up the build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -387,7 +387,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -402,10 +402,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -413,17 +412,16 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF > ${work_dir}/etc/resolv.conf
|
cat << EOF > ${work_dir}/etc/resolv.conf
|
||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -644,7 +642,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Clean up the build system"
|
echo "Clean up the build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -385,7 +385,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -400,10 +400,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -411,17 +410,16 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF > kali-${architecture}/etc/resolv.conf
|
cat << EOF > kali-${architecture}/etc/resolv.conf
|
||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -633,7 +631,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Clean up the build system"
|
echo "Clean up the build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
odroid-c.sh
19
odroid-c.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -287,7 +287,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -302,10 +302,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -313,11 +312,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -677,7 +675,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Clean up the build system"
|
echo "Clean up the build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
21
odroid-c2.sh
21
odroid-c2.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -289,7 +289,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -304,10 +304,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -315,11 +314,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -492,7 +490,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
19
odroid-u2.sh
19
odroid-u2.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -287,7 +287,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -302,10 +302,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -313,11 +312,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -520,7 +518,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Clean up the build system"
|
echo "Clean up the build system"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -325,7 +325,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -340,10 +340,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -351,11 +350,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -494,7 +492,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
23
odroid-w.sh
23
odroid-w.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -325,7 +325,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -340,10 +340,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -351,6 +350,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Create cmdline.txt file
|
# Create cmdline.txt file
|
||||||
cat << EOF > ${work_dir}/boot/cmdline.txt
|
cat << EOF > ${work_dir}/boot/cmdline.txt
|
||||||
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0
|
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0
|
||||||
@@ -364,13 +369,6 @@ proc /proc proc defaults 0 0
|
|||||||
/dev/mmcblk0p1 /boot vfat defaults 0 2
|
/dev/mmcblk0p1 /boot vfat defaults 0 2
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -471,7 +469,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -288,7 +288,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -303,10 +303,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -314,6 +313,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
||||||
M ttySAC2 c 5 1
|
M ttySAC2 c 5 1
|
||||||
EOF
|
EOF
|
||||||
@@ -324,13 +329,6 @@ ttySAC1
|
|||||||
ttySAC2
|
ttySAC2
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -521,7 +519,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -280,7 +280,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -295,10 +295,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -306,11 +305,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
|
|||||||
23
pinebook.sh
23
pinebook.sh
@@ -31,7 +31,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -335,7 +335,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -350,10 +350,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -361,6 +360,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up some defaults for chromium, if the user ever installs it
|
# Set up some defaults for chromium, if the user ever installs it
|
||||||
mkdir -p ${work_dir}/etc/chromium/
|
mkdir -p ${work_dir}/etc/chromium/
|
||||||
cat << EOF > ${work_dir}/etc/chromium/default
|
cat << EOF > ${work_dir}/etc/chromium/default
|
||||||
@@ -375,13 +380,6 @@ CHROMIUM_FLAGS="\
|
|||||||
"
|
"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -493,7 +491,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
23
riot.sh
23
riot.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -316,7 +316,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -331,10 +331,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -342,6 +341,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
||||||
M ttymxc1 c 5 1
|
M ttymxc1 c 5 1
|
||||||
EOF
|
EOF
|
||||||
@@ -359,13 +364,6 @@ proc /proc proc defaults 0 0
|
|||||||
/dev/mmcblk0p1 /boot vfat defaults 0 2
|
/dev/mmcblk0p1 /boot vfat defaults 0 2
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -487,7 +485,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
21
rpi.sh
21
rpi.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -236,7 +236,7 @@ eatmydata apt-get install -y \$aptops ${packages} || eatmydata apt-get --yes --f
|
|||||||
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
||||||
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
||||||
eatmydata apt-get install -y \$aptops --autoremove systemd-timesyncd || eatmydata apt-get --yes --fix-broken install
|
eatmydata apt-get install -y \$aptops --autoremove systemd-timesyncd || eatmydata apt-get --yes --fix-broken install
|
||||||
eatmydata apt-get dist-upgrade -y \$aptops
|
eatmydata apt-get dist-upgrade -y \$aptops
|
||||||
|
|
||||||
eatmydata apt-get --yes --allow-change-held-packages --purge autoremove
|
eatmydata apt-get --yes --allow-change-held-packages --purge autoremove
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -327,10 +327,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -338,11 +337,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -455,7 +453,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -350,7 +350,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -365,10 +365,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -376,11 +375,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -494,7 +492,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -316,31 +316,44 @@ if [[ $? > 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat << EOF > kali-${architecture}/cleanup
|
# Clean system
|
||||||
#!/bin/bash
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -rf /root/.bash_history
|
|
||||||
rm -rf /root/P4wnP1_go
|
|
||||||
apt-get update
|
|
||||||
apt-get clean
|
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -f /hs_err*
|
rm -rf /bsp
|
||||||
rm -f cleanup
|
fc-cache -frs
|
||||||
rm -f /usr/bin/qemu*
|
rm -rf /tmp/*
|
||||||
|
rm -rf /etc/*-
|
||||||
|
rm -rf /hs_err*
|
||||||
|
rm -rf /userland
|
||||||
|
rm -rf /opt/vc/src
|
||||||
|
rm -f /etc/ssh/ssh_host_*
|
||||||
|
rm -rf /var/lib/dpkg/*-old
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
rm -rf /var/cache/apt/*.bin
|
||||||
|
rm -rf /var/cache/apt/archives/*
|
||||||
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
|
history -c
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Disable the use of http proxy in case it is enabled.
|
||||||
|
if [ -n "$proxy_url" ]; then
|
||||||
|
unset http_proxy
|
||||||
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 755 kali-${architecture}/cleanup
|
chmod 755 kali-${architecture}/cleanup
|
||||||
LANG=C systemd-nspawn -M ${machine} -D kali-${architecture} /cleanup
|
LANG=C systemd-nspawn -M ${machine} -D kali-${architecture} /cleanup
|
||||||
|
|
||||||
# Enable login over serial
|
# Enable login over serial
|
||||||
echo "T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100" >> ${work_dir}/etc/inittab
|
echo "T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100" >> ${work_dir}/etc/inittab
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -584,7 +597,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -211,7 +211,7 @@ export DEBIAN_FRONTEND=noninteractive
|
|||||||
|
|
||||||
eatmydata apt-get update
|
eatmydata apt-get update
|
||||||
|
|
||||||
eatmydata apt-get -y install binutils ca-certificates console-common git initramfs-tools less locales nano u-boot-tools
|
eatmydata apt-get -y install binutils ca-certificates console-common git initramfs-tools less locales nano u-boot-tools
|
||||||
|
|
||||||
# Create kali user with kali password... but first, we need to manually make some groups because they don't yet exist...
|
# Create kali user with kali password... but first, we need to manually make some groups because they don't yet exist...
|
||||||
# This mirrors what we have on a pre-installed VM, until the script works properly to allow end users to set up their own... user.
|
# This mirrors what we have on a pre-installed VM, until the script works properly to allow end users to set up their own... user.
|
||||||
@@ -344,7 +344,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -359,10 +359,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -370,11 +369,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -483,7 +481,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -337,10 +337,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
|
|||||||
21
rpi3-64.sh
21
rpi3-64.sh
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -241,7 +241,7 @@ install -m755 /bsp/scripts/monstop /usr/bin/
|
|||||||
# Resize rootfs script
|
# Resize rootfs script
|
||||||
install -m755 /bsp/scripts/rpi-resizerootfs /usr/sbin/
|
install -m755 /bsp/scripts/rpi-resizerootfs /usr/sbin/
|
||||||
|
|
||||||
# Add rpi userland to the path (e.g. vcgencmd)
|
# Add rpi userland to the path (e.g. vcgencmd)
|
||||||
install -m644 /bsp/configs/raspi-userland.conf /etc/ld.so.conf.d/
|
install -m644 /bsp/configs/raspi-userland.conf /etc/ld.so.conf.d/
|
||||||
install -m644 /bsp/configs/vc.sh /etc/profile.d/vc.sh
|
install -m644 /bsp/configs/vc.sh /etc/profile.d/vc.sh
|
||||||
install -m644 /bsp/udev/99-vchiq-permissions.rules /etc/udev/rules.d/
|
install -m644 /bsp/udev/99-vchiq-permissions.rules /etc/udev/rules.d/
|
||||||
@@ -326,7 +326,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -341,10 +341,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -352,11 +351,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -495,7 +493,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -308,7 +308,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -323,10 +323,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -334,6 +333,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
# Create cmdline.txt file
|
# Create cmdline.txt file
|
||||||
cat << EOF > ${work_dir}/boot/cmdline.txt
|
cat << EOF > ${work_dir}/boot/cmdline.txt
|
||||||
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0
|
dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0
|
||||||
@@ -348,13 +353,6 @@ proc /proc proc defaults 0 0
|
|||||||
/dev/mmcblk0p2 / $fstype defaults,noatime 0 1
|
/dev/mmcblk0p2 / $fstype defaults,noatime 0 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -461,7 +459,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Cleaning up the temporary build files..."
|
echo "Cleaning up the temporary build files..."
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
25
trimslice.sh
25
trimslice.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -251,7 +251,7 @@ eatmydata apt-get install -y \$aptops ${packages} || eatmydata apt-get --yes --f
|
|||||||
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
||||||
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
eatmydata apt-get install -y \$aptops ${desktop} ${extras} ${tools} || eatmydata apt-get --yes --fix-broken install
|
||||||
eatmydata apt-get install -y \$aptops --autoremove systemd-timesyncd || eatmydata apt-get --yes --fix-broken install
|
eatmydata apt-get install -y \$aptops --autoremove systemd-timesyncd || eatmydata apt-get --yes --fix-broken install
|
||||||
eatmydata apt-get dist-upgrade -y \$aptops
|
eatmydata apt-get dist-upgrade -y \$aptops
|
||||||
|
|
||||||
# Install the kernel here. This is due to needing to fake being an arm device for flash-kernel to work properly.
|
# Install the kernel here. This is due to needing to fake being an arm device for flash-kernel to work properly.
|
||||||
cd /root && gcc -Wall -shared -o libfakeuname.so fakeuname.c
|
cd /root && gcc -Wall -shared -o libfakeuname.so fakeuname.c
|
||||||
@@ -314,7 +314,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -329,10 +329,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -340,6 +339,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
||||||
M ttyS0 c 5 1
|
M ttyS0 c 5 1
|
||||||
EOF
|
EOF
|
||||||
@@ -357,13 +362,6 @@ proc /proc proc defaults 0 0
|
|||||||
/dev/mmcblk0p1 /boot ext2 defaults 0 2
|
/dev/mmcblk0p1 /boot ext2 defaults 0 2
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Mirror replacement
|
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
|
||||||
mirror=${@:5}
|
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
cat << EOF > ${work_dir}/etc/apt/sources.list
|
cat << EOF > ${work_dir}/etc/apt/sources.list
|
||||||
deb ${mirror} ${suite} ${components//,/ }
|
deb ${mirror} ${suite} ${components//,/ }
|
||||||
@@ -458,6 +456,5 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -294,10 +294,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
|
|||||||
43
usbarmory.sh
43
usbarmory.sh
@@ -29,11 +29,11 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
githubraw="https://raw.githubusercontent.com"
|
githubraw="$githubraw"
|
||||||
|
|
||||||
# Check EUID=0 you can run any binary as root.
|
# Check EUID=0 you can run any binary as root.
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
@@ -279,7 +279,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -294,10 +294,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -305,11 +304,10 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Mirror replacement
|
# Mirror & suite replacement
|
||||||
if [[ ! -z "${@:5}" || "$suite" != "kali-rolling" ]]; then
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
mirror=${@:5}
|
mirror=${4}
|
||||||
[ ! -z "${@:5}" ] || mirror="http://http.kali.org/kali"
|
suite=${5}
|
||||||
[ "$suite" != "kali-rolling" ] && suite=kali-rolling
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define sources.list
|
# Define sources.list
|
||||||
@@ -480,12 +478,12 @@ export ARCH=arm
|
|||||||
export CROSS_COMPILE=arm-linux-gnueabihf-
|
export CROSS_COMPILE=arm-linux-gnueabihf-
|
||||||
patch -p1 --no-backup-if-mismatch < ${current_dir}/patches/kali-wifi-injection-4.14.patch
|
patch -p1 --no-backup-if-mismatch < ${current_dir}/patches/kali-wifi-injection-4.14.patch
|
||||||
patch -p1 --no-backup-if-mismatch < ${current_dir}/patches/0001-wireless-carl9170-Enable-sniffer-mode-promisc-flag-t.patch
|
patch -p1 --no-backup-if-mismatch < ${current_dir}/patches/0001-wireless-carl9170-Enable-sniffer-mode-promisc-flag-t.patch
|
||||||
#wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/usbarmory_linux-4.14.config -O .config
|
#wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/usbarmory_linux-4.14.config -O .config
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-host.dts -O arch/arm/boot/dts/imx53-usbarmory-host.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-host.dts -O arch/arm/boot/dts/imx53-usbarmory-host.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-gpio.dts -O arch/arm/boot/dts/imx53-usbarmory-gpio.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-gpio.dts -O arch/arm/boot/dts/imx53-usbarmory-gpio.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-spi.dts -O arch/arm/boot/dts/imx53-usbarmory-spi.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-spi.dts -O arch/arm/boot/dts/imx53-usbarmory-spi.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-i2c.dts -O arch/arm/boot/dts/imx53-usbarmory-i2c.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-i2c.dts -O arch/arm/boot/dts/imx53-usbarmory-i2c.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-scc2.dts -O arch/arm/boot/dts/imx53-usbarmory-scc2.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-scc2.dts -O arch/arm/boot/dts/imx53-usbarmory-scc2.dts
|
||||||
cp ${current_dir}/kernel-configs/usbarmory-4.14.config ${work_dir}/usr/src/kernel/.config
|
cp ${current_dir}/kernel-configs/usbarmory-4.14.config ${work_dir}/usr/src/kernel/.config
|
||||||
cp ${current_dir}/kernel-configs/usbarmory-4.14.config ${work_dir}/usr/src/usbarmory-4.14.config
|
cp ${current_dir}/kernel-configs/usbarmory-4.14.config ${work_dir}/usr/src/usbarmory-4.14.config
|
||||||
make LOADADDR=0x70008000 -j $(grep -c processor /proc/cpuinfo) uImage modules imx53-usbarmory-gpio.dtb imx53-usbarmory-i2c.dtb imx53-usbarmory-spi.dtb imx53-usbarmory.dtb imx53-usbarmory-host.dtb imx53-usbarmory-scc2.dtb
|
make LOADADDR=0x70008000 -j $(grep -c processor /proc/cpuinfo) uImage modules imx53-usbarmory-gpio.dtb imx53-usbarmory-i2c.dtb imx53-usbarmory-spi.dtb imx53-usbarmory.dtb imx53-usbarmory-host.dtb imx53-usbarmory-scc2.dtb
|
||||||
@@ -495,11 +493,11 @@ cp arch/arm/boot/dts/imx53-usbarmory*.dtb ${work_dir}/boot/
|
|||||||
make mrproper
|
make mrproper
|
||||||
# Since these aren't integrated into the kernel yet, mrproper removes them.
|
# Since these aren't integrated into the kernel yet, mrproper removes them.
|
||||||
cp ${current_dir}/kernel-configs/usbarmory-4.14.config ${work_dir}/usr/src/kernel/.config
|
cp ${current_dir}/kernel-configs/usbarmory-4.14.config ${work_dir}/usr/src/kernel/.config
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-host.dts -O arch/arm/boot/dts/imx53-usbarmory-host.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-host.dts -O arch/arm/boot/dts/imx53-usbarmory-host.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-gpio.dts -O arch/arm/boot/dts/imx53-usbarmory-gpio.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-gpio.dts -O arch/arm/boot/dts/imx53-usbarmory-gpio.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-spi.dts -O arch/arm/boot/dts/imx53-usbarmory-spi.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-spi.dts -O arch/arm/boot/dts/imx53-usbarmory-spi.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-i2c.dts -O arch/arm/boot/dts/imx53-usbarmory-i2c.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-i2c.dts -O arch/arm/boot/dts/imx53-usbarmory-i2c.dts
|
||||||
wget https://raw.githubusercontent.com/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-scc2.dts -O arch/arm/boot/dts/imx53-usbarmory-scc2.dts
|
wget $githubraw/inversepath/usbarmory/master/software/kernel_conf/mark-one/imx53-usbarmory-scc2.dts -O arch/arm/boot/dts/imx53-usbarmory-scc2.dts
|
||||||
|
|
||||||
|
|
||||||
# Fix up the symlink for building external modules
|
# Fix up the symlink for building external modules
|
||||||
@@ -599,7 +597,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing build directory"
|
echo "Removing build directory"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
18
utilite.sh
18
utilite.sh
@@ -32,7 +32,7 @@ compress="xz"
|
|||||||
# Choose filesystem format to format ( ext3 or ext4 )
|
# Choose filesystem format to format ( ext3 or ext4 )
|
||||||
fstype="ext3"
|
fstype="ext3"
|
||||||
# If you have your own preferred mirrors, set them here.
|
# If you have your own preferred mirrors, set them here.
|
||||||
mirror=${4:-"http://http.kali.org/kali"}
|
mirror=${mirror:-"http://http.kali.org/kali"}
|
||||||
# Gitlab url Kali repository
|
# Gitlab url Kali repository
|
||||||
kaligit="https://gitlab.com/kalilinux"
|
kaligit="https://gitlab.com/kalilinux"
|
||||||
# Github raw url
|
# Github raw url
|
||||||
@@ -284,7 +284,7 @@ systemd-nspawn_exec /third-stage
|
|||||||
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
systemd-nspawn_exec dpkg-divert --remove --rename /usr/bin/dpkg
|
||||||
|
|
||||||
# Clean system
|
# Clean system
|
||||||
systemd-nspawn_exec << EOF
|
systemd-nspawn_exec << 'EOF'
|
||||||
rm -f /0
|
rm -f /0
|
||||||
rm -rf /bsp
|
rm -rf /bsp
|
||||||
fc-cache -frs
|
fc-cache -frs
|
||||||
@@ -299,10 +299,9 @@ rm -rf /var/lib/apt/lists/*
|
|||||||
rm -rf /var/cache/apt/*.bin
|
rm -rf /var/cache/apt/*.bin
|
||||||
rm -rf /var/cache/apt/archives/*
|
rm -rf /var/cache/apt/archives/*
|
||||||
rm -rf /var/cache/debconf/*.data-old
|
rm -rf /var/cache/debconf/*.data-old
|
||||||
|
for logs in $(find /var/log -type f); do > $logs; done
|
||||||
history -c
|
history -c
|
||||||
EOF
|
EOF
|
||||||
#Clear all logs
|
|
||||||
for logs in `find $work_dir/var/log -type f`; do > $logs; done
|
|
||||||
|
|
||||||
# Disable the use of http proxy in case it is enabled.
|
# Disable the use of http proxy in case it is enabled.
|
||||||
if [ -n "$proxy_url" ]; then
|
if [ -n "$proxy_url" ]; then
|
||||||
@@ -310,6 +309,12 @@ if [ -n "$proxy_url" ]; then
|
|||||||
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
rm -rf ${work_dir}/etc/apt/apt.conf.d/66proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mirror & suite replacement
|
||||||
|
if [[ ! -z "${4}" || ! -z "${5}" ]]; then
|
||||||
|
mirror=${4}
|
||||||
|
suite=${5}
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
cat << EOF >> ${work_dir}/etc/udev/links.conf
|
||||||
M ttymxc3 c 5 1
|
M ttymxc3 c 5 1
|
||||||
EOF
|
EOF
|
||||||
@@ -494,7 +499,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up all the temporary build stuff and remove the directories.
|
# Clean up all the temporary build stuff and remove the directories.
|
||||||
# Comment this out to keep things around if you want to see what may have gone
|
# Comment this out to keep things around if you want to see what may have gone wrong.
|
||||||
# wrong.
|
|
||||||
echo "Removing temporary build files"
|
echo "Removing temporary build files"
|
||||||
rm -rf "${basedir}"
|
rm -rf "${basedir}"
|
||||||
|
|||||||
Reference in New Issue
Block a user