/me is the grump

This morning I was rudely awakened by the sounds of Boowah and Kwalah as my son Fraser decided to get up at around 6:00am on a Sunday morning. He has been doing this for the last few days, and he has been warned...

The final solution was applied this evening


/etc/cron.d/timelimits
# Enforce time limits on the computer...
* 0-8,20-23 * * * root /usr/local/sbin/timelimits || /sbin/shutdown -h now

/usr/local/sbin/timelimits
#!/usr/bin/perl -w
#
# Enforce time limits on the use of the computer.
#

if ( -f "/tmp/notimelimits" ) {
  exit 0;
}

my ( $sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();

my $useful = $hour * 100 + $min;

if ( $useful < 830 || $useful > 2030 ) {
  print "Time for a shutdown!\n";
  exit 1;
}
else {
  exit 0;
}

We shall see if it works. At this stage it has managed to shut the computer down this evening, but I think it should work - at least until he can read this page. Perhaps that will be motivation.

This evening Max also restarted his computer after ostensibly being fast asleep in bed, so I was forced to threaten a similar approach. I wonder if these children think that threats are irrelevant until / unless they are followed through on? Certainly, they seem to have no effect, and I have little doubt that I would have felt that way about threats at their age.

Note to self: it appears to be about time to point eldest son at Machiavelli...

[D] [Digg] [FB] [R] [SU] [Tweet]