Greetings!
I've done a large amount of google fu work, looked on here, and obviously follow this guide:
http://wiki.tinycorelinux.net/wiki:remasteringhere's my bootlocal.sh (I know I don't have to indirectly call perl, but doing this so I can add bash system commands later)
#!/bin/sh
# put other system startup commands here
/opt/login.sh
here's login.pl ( a couple of scrubbed items)
#************************
# Written by Shades
# Description: This script simply pops open a firefox window for whitelisting, and
# once they close firefox, it will reboot them.
# This Script is built in such a way that it doesn't require any libraries to be
brought in.
# Input / Output: None\
# Usage: Startup script to be put in rc.local, etc. on boot start.
# Version: 0.2.1
#************************
#---------
# Grab libraries needed that are included in base OS
#---------
use strict;
#---------
# Declare variables and set initial values
#---------
my $mac = `cat /sys/class/net/eth0/address` or die("Not a valid Linux system!");
# Grab the mac from the mac file
my $url = 'https://internalwebsite/?mac=' . $mac;
my $statuslength = 10;
my $status = '';
my $verbose = 0; # Set to 1 if you want verbosity for troubleshooting
#--------
# Open Firefox and detect when it's done
#--------
system("firefox $url &") or die("Erroring running firefox command!");
# Commenting out the below until testing proves above will not move forward unti
l completed.
# Will be deperacated in version 0.3.0
#while ($statuslength > 2) {
# $status = `ps -eflno | grep -i firefox | grep -vi "grep"`;
# $statuslength = length($status); # Grab length of response, should be 1
if close for \n
# if ($verbose = 1) {
# # Output the verbose features here for this routine.
# print "Length of ps return: " . $statuslength;
# print "ps response: " . $status;
# }
# sleep 3; # To try and save on some memory / processing by sleeping for 3
seconds.
#}
#--------
# Reboot system (into PXE?)
#--------
system("sudo reboot");
My issue is it throws this error after loading extensions:
mount: can't setup loop device: No space left on device
and afterwards throws similar errors for each plugin. My perl script has been test on my normal TC box, and throws no errors / runs as expected when ran manually (not included in bootlocal.sh). Any ideas as to why it does this when included in bootlocal.sh? Is it trying to run all these scripts before X startup? If so, how do I get it run automatically after X startup? Cron spool file? Appreciate any help and hope the script gives ideas to any one else