Update apt commands

Update the apt command away from --force-yes which is deprecated and
will go away.
This commit is contained in:
Steev Klimaszewski
2018-06-19 19:53:27 -05:00
parent 6dc2d95313
commit 58a8a29559
32 changed files with 126 additions and 126 deletions

View File

@@ -103,7 +103,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -114,13 +114,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
sed -i -e 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
update-rc.d ssh enable

View File

@@ -103,7 +103,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -114,13 +114,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
sed -i -e 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
update-rc.d ssh enable

8
bbb.sh
View File

@@ -122,7 +122,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -133,13 +133,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
echo "Making the image insecure"
sed -i -e 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

View File

@@ -104,7 +104,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -115,13 +115,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -104,7 +104,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -115,13 +115,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -102,7 +102,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -113,13 +113,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -101,7 +101,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -112,13 +112,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -101,7 +101,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -112,13 +112,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -101,7 +101,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -112,13 +112,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -120,7 +120,7 @@ apt-get -y install locales console-common less nano git
echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install

View File

@@ -96,7 +96,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -107,13 +107,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -94,7 +94,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get install --yes --force-yes locales-all
apt-get install --yes --allow-change-held-packages locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -104,7 +104,7 @@ apt-get -y install locales console-common less nano git
echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install

View File

@@ -101,7 +101,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -112,13 +112,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -111,7 +111,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -122,13 +122,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -111,7 +111,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -122,13 +122,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -104,7 +104,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -115,13 +115,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -113,7 +113,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -124,13 +124,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -104,7 +104,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -115,13 +115,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -103,7 +103,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -114,13 +114,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
sed -i -e 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
update-rc.d ssh enable

View File

@@ -103,7 +103,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -114,13 +114,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
update-rc.d ssh enable

View File

@@ -113,7 +113,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -124,13 +124,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -109,7 +109,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -120,13 +120,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -105,7 +105,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -116,13 +116,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -104,7 +104,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -115,13 +115,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

8
rpi.sh
View File

@@ -126,7 +126,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -135,13 +135,13 @@ apt-get -y install locales console-common less nano git
echo "root:toor" | chpasswd
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -147,7 +147,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -158,13 +158,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Install P4wnP1 (kali version)
git clone https://github.com/nethunteros/P4wnP1.git /root/P4wnP1
@@ -210,7 +210,7 @@ cp /etc/bash.bashrc /root/.bashrc
# libinput seems to fail hard on RaspberryPi devices, so we make sure it's not
# installed here (and we have xserver-xorg-input-evdev and
# xserver-xorg-input-synaptics packages installed above!)
apt-get --yes --force-yes purge xserver-xorg-input-libinput
apt-get --yes --allow-change-held-packages purge xserver-xorg-input-libinput
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -144,7 +144,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -155,13 +155,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.
@@ -184,7 +184,7 @@ cp /etc/bash.bashrc /root/.bashrc
# libinput seems to fail hard on RaspberryPi devices, so we make sure it's not
# installed here (and we have xserver-xorg-input-evdev and
# xserver-xorg-input-synaptics packages installed above!)
apt-get --yes --force-yes purge xserver-xorg-input-libinput
apt-get --yes --allow-change-held-packages purge xserver-xorg-input-libinput
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

10
rpi2.sh
View File

@@ -102,7 +102,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -113,13 +113,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.
@@ -131,7 +131,7 @@ update-rc.d ssh enable
# libinput seems to fail hard on RaspberryPi devices, so we make sure it's not
# installed here (and we have xserver-xorg-input-evdev and
# xserver-xorg-input-synaptics packages installed above!)
apt-get --yes --force-yes purge xserver-xorg-input-libinput
apt-get --yes --allow-change-held-packages purge xserver-xorg-input-libinput
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -159,7 +159,7 @@ cp /bin/true /usr/sbin/invoke-rc.d
echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
apt-get -y install git-core binutils ca-certificates initramfs-tools u-boot-tools
@@ -168,18 +168,18 @@ echo "root:toor" | chpasswd
# sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
# rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.
# libinput seems to fail hard on RaspberryPi devices, so we make sure it's not
# installed here (and we have xserver-xorg-input-evdev and
# xserver-xorg-input-synaptics packages installed above!)
apt-get --yes --force-yes purge xserver-xorg-input-libinput
apt-get --yes --allow-change-held-packages purge xserver-xorg-input-libinput
echo "Making the image insecure"
rm -f /etc/ssh/ssh_host_*_key*
sed -i -e 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

View File

@@ -105,7 +105,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -116,13 +116,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d

View File

@@ -105,7 +105,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -116,13 +116,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
# Because copying in authorized_keys is hard for people to do, let's make the
# image insecure and enable root login with a password.

View File

@@ -106,7 +106,7 @@ echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
apt-get update
apt-get --yes --force-yes install locales-all
apt-get --yes --allow-change-held-packages install locales-all
debconf-set-selections /debconf.set
rm -f /debconf.set
@@ -117,13 +117,13 @@ echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
export DEBIAN_FRONTEND=noninteractive
apt-get --yes --force-yes install $packages
apt-get --yes --allow-change-held-packages install $packages
if [ $? > 0 ];
then
apt-get --yes --allow-change-held-packages --fix-broken install
fi
apt-get --yes --force-yes dist-upgrade
apt-get --yes --force-yes autoremove
apt-get --yes --allow-change-held-packages dist-upgrade
apt-get --yes --allow-change-held-packages autoremove
rm -f /usr/sbin/policy-rc.d
rm -f /usr/sbin/invoke-rc.d