Setting Start And Stop Of Application Programs - Hitachi CE50-10 Instruction Manual

Table of Contents

Advertisement

Definition item
<mount>
<type>
<mode>
<initial>
<fsckcnt>
(c) Applying the definition to the unit
After editing the definition file by a user, enable it by restarting the unit.
(d) Definition example
#<device>
<mount>
/dev/sda11
/app/prog
/dev/sda12
/app/log
/dev/sda10
/app/contents ext4
(e) Checking the definition file
After editing the definition file, run the fsconfchk command to check the contents. For details about the command,
see 5.18.9 fsconfchk.
$ sudo fsconfchk
(f) Note
If the file system is not constructed yet, specifying a value from 1 to 3 for fsckcnt and 1 for initial causes the
file system to be reformatted with the specified type. If 0 is specified for initial or fsckcnt, the file system is
not reformatted and an attempt to mount the device fails.
5.11.4 Setting start and stop of application programs
(1) Creating a script file
To use systemd to start and stop application programs, you need to create a configuration file (systemd script file)
and store it in the specified directory (/lib/systemd/system/). When the file is stored, an application program
is registered as one of the services of the OS.
The following describes how to specify the systemd script.
Enter the following information in a file named application-program-name.service under the /lib/systemd/
system/ directory.
[Unit]
Description=<description>
Requires=<prerequisite-service>
After=fsmount.service<start-timing>
Specify the full path name of the mount destination directory. The specified directory is automatically
created by the OS.
Specify the file system type. The applicable file system is EXT4 only.
Specify either of the following as the write mode to be used when the file system is mounted:
• rw: Read and write are possible.
• ro: Read only (write prohibited)
Specify whether to automatically reformat the file system if an attempt to repair the file system fails. To
enable reformatting, you need to specify 1 or greater for the fsckcnt option.
• 0: Reformat.
• 1: Do not reformat.
Specify how many times a file system check is to be performed, as a number in the range from 0 to 3.
Specify 0 if you do not want to have the file system checked.
<type>
<mode> <initial> <fsckcnt>
ext4
ro
ext4
rw
rw
5. Configuring Software Environment
Description
0
0
1
2
1
0
61

Advertisement

Table of Contents
loading

Table of Contents