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:
2020-07-20 10:58:29 -05:00
commit 99d0fe56cd
30 changed files with 12619 additions and 0 deletions

View 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