First check in after re-naming snap to sl. This involved a lot of variable renaming and there are likely a number of other little hacks and tweaks.
This commit is contained in:
63
ROOT/etc/sl.d/templates/server/packages
Normal file
63
ROOT/etc/sl.d/templates/server/packages
Normal file
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# This is a basic server install which includes openssh-server along with
|
||||
# other packages typically expected on servers
|
||||
#
|
||||
|
||||
binutils
|
||||
bzip2
|
||||
coreutils
|
||||
cpio
|
||||
cron
|
||||
dash
|
||||
dhclient
|
||||
e2fsprogs
|
||||
eudev
|
||||
ex
|
||||
findutils
|
||||
gawk
|
||||
gdbm
|
||||
glibc
|
||||
gmp
|
||||
grep
|
||||
groff
|
||||
grub
|
||||
gzip
|
||||
iana-etc
|
||||
iftools
|
||||
inetutils
|
||||
initscripts
|
||||
iproute2
|
||||
kmod
|
||||
less
|
||||
libacl
|
||||
libattr
|
||||
libcap
|
||||
libgcc
|
||||
libpipeline
|
||||
libstdc++
|
||||
libzfs
|
||||
linux
|
||||
man-db
|
||||
mkinitramfs
|
||||
mpfr
|
||||
ncurses
|
||||
net-tools
|
||||
openssh-client
|
||||
openssh-server
|
||||
perl
|
||||
procps-ng
|
||||
psmisc
|
||||
readline
|
||||
rsyslog
|
||||
sed
|
||||
shadow
|
||||
snap
|
||||
snap-base
|
||||
sysvinit
|
||||
tar
|
||||
tar
|
||||
texinfo
|
||||
tzdata
|
||||
util-linux
|
||||
xz
|
||||
zlib
|
||||
45
ROOT/etc/sl.d/templates/server/postinst
Normal file
45
ROOT/etc/sl.d/templates/server/postinst
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
### PLACEHOLDER ###
|
||||
# This script needs to provide things like network setup perhaps
|
||||
|
||||
# This code should help with setting up the network interfaces
|
||||
#
|
||||
#my $dir = '/sys/class/net';
|
||||
#my $devs = {};
|
||||
#
|
||||
#opendir( my $dh, $dir ) || die( $! );
|
||||
#
|
||||
#while ( readdir( $dh ) ) {
|
||||
# my $link = readlink( "$dir/$_" ) || next;
|
||||
#
|
||||
# if ( $link =~ /virtual/ ) {
|
||||
# next;
|
||||
# }
|
||||
#
|
||||
# open( my $fh, "$dir/$_/address" ) || die( $! );
|
||||
# $devs->{$_}{'mac'} = <$fh>;
|
||||
# close( $fh );
|
||||
#
|
||||
# chomp( $devs->{$_}{'mac'} );
|
||||
# }
|
||||
#
|
||||
#foreach my $dev ( sort( keys( %$devs ) ) ) {
|
||||
# print "$dev - $devs->{$dev}{'mac'}\n";
|
||||
# }
|
||||
|
||||
if [ -n "$HOSTNAME" ]; then
|
||||
cat > /etc/hostname <<EOF
|
||||
$HOSTNAME
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -n "$ROOTPW" ]; then
|
||||
chpasswd <<EOF
|
||||
root:$ROOTPW
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -n "$TZFILE" ]; then
|
||||
ln -s "$TZFILE" /etc/localtime
|
||||
fi
|
||||
Reference in New Issue
Block a user