diff --git a/OS/README b/OS/README deleted file mode 100644 index 1e7ae7a..0000000 --- a/OS/README +++ /dev/null @@ -1,4 +0,0 @@ -These files contain suggested commands used to setup given OS for minimal install - -You should not run the files as scripts, it should be rather used as a guide -to let you know what to delete, what to run and how \ No newline at end of file diff --git a/Slax/README b/Slax/README new file mode 100644 index 0000000..01dd4ab --- /dev/null +++ b/Slax/README @@ -0,0 +1,2 @@ +Each directory contains scripts for easier building of minimal OS installation, +also known as SLAX - Small Live Auxiliary linuX diff --git a/Slax/debian/build b/Slax/debian/build new file mode 100644 index 0000000..a5faa27 --- /dev/null +++ b/Slax/debian/build @@ -0,0 +1,16 @@ +#!/bin/bash + +. ./install +. ./cleanup +. ./copy + +# now run build script +cd ../../ +./build + +apt-get update +apt-get install aufs-dkms + +# and re-setup initrd to include aufs +./initramfs/initramfs_create + diff --git a/OS/debian.txt b/Slax/debian/cleanup similarity index 56% rename from OS/debian.txt rename to Slax/debian/cleanup index bbc81b9..758a075 100644 --- a/OS/debian.txt +++ b/Slax/debian/cleanup @@ -1,7 +1,4 @@ - -apt-get install mc squashfs-tools genisoimage zip -apt-get remove libicu* libperl* libxml2 mime-support perl \ - perl-modules-5.24 sgml-base shared-mime-info xdg-user-dirs xml-core +#!/bin/bash rm -f /var/lib/apt/lists/deb.* rm -f /var/log/* @@ -10,6 +7,9 @@ rm -f /var/log/*/*/* rm -f /var/cache/apt/archives/*.deb rm -f /var/cache/apt/*.bin rm -f /var/cache/debconf/*-old +rm -f /var/lib/dhcp/dhclient.leases +rm -f /root/.bash_history +rm -f /root/.wget-hsts rm -Rf /usr/share/doc/* rm -Rf /usr/share/locale/?? @@ -19,13 +19,3 @@ rm -Rf /usr/share/locale/??? rm -Rf /usr/share/i18n/locales/*_* rm -Rf /usr/share/man/?? rm -Rf /usr/share/man/*_* - -# now run build script -cd .. -./build - -apt-get install aufs-dkms - -# and re-setup initrd to include aufs -./initramfs/initramfs_create - diff --git a/Slax/debian/copy b/Slax/debian/copy new file mode 100644 index 0000000..7a0adaa --- /dev/null +++ b/Slax/debian/copy @@ -0,0 +1,3 @@ +#!/bin/bash + +(cd rootcopy && cp --parents -afr * /) diff --git a/Slax/debian/install b/Slax/debian/install new file mode 100644 index 0000000..d836f49 --- /dev/null +++ b/Slax/debian/install @@ -0,0 +1,7 @@ +#!/bin/bash + +apt-get install mc squashfs-tools genisoimage zip +apt-get remove libicu* libperl* libxml2 mime-support perl \ + perl-modules-5.24 sgml-base shared-mime-info xdg-user-dirs xml-core + +cp ../../tools/dir2sb /usr/bin diff --git a/Slax/debian/rootcopy/etc/hostname b/Slax/debian/rootcopy/etc/hostname new file mode 100644 index 0000000..e11b7e5 --- /dev/null +++ b/Slax/debian/rootcopy/etc/hostname @@ -0,0 +1 @@ +Slax-Debian diff --git a/Slax/debian/rootcopy/etc/systemd/system/dhclient.service b/Slax/debian/rootcopy/etc/systemd/system/dhclient.service new file mode 100644 index 0000000..d498e7d --- /dev/null +++ b/Slax/debian/rootcopy/etc/systemd/system/dhclient.service @@ -0,0 +1,13 @@ +[Unit] +Description=DHCP Client +Documentation=man:dhclient(8) +Wants=network.target +Before=network.target + +[Service] +Type=forking +PIDFile=/var/run/dhclient.pid +ExecStart=/sbin/dhclient + +[Install] +WantedBy=multi-user.target diff --git a/Slax/debian/rootcopy/etc/systemd/system/multi-user.target.wants/dhclient.service b/Slax/debian/rootcopy/etc/systemd/system/multi-user.target.wants/dhclient.service new file mode 120000 index 0000000..23c15d1 --- /dev/null +++ b/Slax/debian/rootcopy/etc/systemd/system/multi-user.target.wants/dhclient.service @@ -0,0 +1 @@ +../dhclient.service \ No newline at end of file diff --git a/build b/build index 52145b4..85cf374 100755 --- a/build +++ b/build @@ -83,5 +83,5 @@ rm -f "$TARGET/$LIVEKITNAME-$ARCH.zip" zip -0 -r "$TARGET/$LIVEKITNAME-$ARCH.zip" * cd .. -rm -Rf "$LIVEKITDATA" -echo "finished. Find your result in $TARGET" +#rm -Rf "$LIVEKITDATA" +echo "finished. Find your results in $TARGET"