Spring 2015 CSCI 372 Programming — A simple script

The motivation

I’ve been told that IPv6 should be disabled on all UNC Asheville computers. I’m not sure why, but I do see the IPv6 is running on many of the Ubuntu workstations using one of those link-local addresses when I type the command
    ip -6 addr

If you read the posting How to disable IPv6 in Ubuntu 14.0v4, you see that this involves changing the file /etc/sysctl.conf.

The task

However, rather than modifying /etc/sysctl.conf, just copy /etc/sysctl.conf to your directory and write a script to make the simple modification mentioned in the posting.

But let’s add one small detail. Your script must not change the file more than once. It must read sysctl.conf and make the change only if it is not already present.