Changes

Jump to: navigation, search

OSL740 Lab 6

6 bytes removed, 10:40, 25 March 2022
m
INVESTIGATION 3: USING PYTHON TO MODIFY FILES
=INVESTIGATION 3: USING PYTHON TO MODIFY FILES=
In this investigation you will write a python script that will allow a user to interactively configure a network interface's configuration file. Before beginning, '''make a backup of your ifcfg files'''. '''Store the python script in ~/bin/''' on c7host.
Write a script called '''netconfig.py''' that will prompt the user for the following values, and write their answers into an ifcfg file stored in the '''/etc/sysconfig/network-scripts''' directory.
# Switch to your '''c7host''' VM.
# Change to your user's '''bin''' directory.
# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget https://wwwosl740.dropboxgithub.comio/s/fmhcsezezx1j8lilabs/lab6-check.bash</span></code></b>
# Give the '''lab6-check.bash''' file execute permissions (for the file owner).
# Run the shell script and if there are any warnings, make fixes and re-run shell script until you receive "congratulations" message.
572
edits

Navigation menu