Editing How does the Synology Linux implementation work, e.g. bootup, device management etc
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 10: | Line 10: | ||
#File "/etc/defaults/rc.conf" to set initial parameters and the path to find other startup scripts which is set as... local_startup="/etc/rc.d /usr/syno/etc/rc.d /usr/local/etc/rc.d" | #File "/etc/defaults/rc.conf" to set initial parameters and the path to find other startup scripts which is set as... local_startup="/etc/rc.d /usr/syno/etc/rc.d /usr/local/etc/rc.d" | ||
#So the script "/etc/rc" is run. It does many things including a check for (and then execute if it exists) the file " | #So the script "/etc/rc" is run. It does many things including a check for (and then execute if it exists) the file "etc/rc.local" which 'I think' is an ipkg installed script. | ||
===How is PATH set=== | ===How is PATH set=== | ||
For CS407 fw597 'I think' this is first set by "/etc/rc" then by " | For CS407 fw597 'I think' this is first set by "/etc/rc" then by "etc/rc.local" (if you have ipkg) then by "/etc/profile" and then by the ".profile" file in the users HOME directory (i.e. "/root/.profile" for user root). | ||
===What happens when you log in to the Command Line Interface=== | ===What happens when you log in to the Command Line Interface=== | ||
For CS407 fw598 when you log in to the Comand Line Interface (via either SSH or Telnet) as a user (usually root) the NAS creates a ptty ash shell for you and drops you into that users "home" directory as defined in the file "/etc/passwd". It then runs the file "/etc/profile". If the home directory of the logging in user contains a file ".profile" (synology use one for the user "root" it is "/root/.profile") this is read and also actioned setting environment variables, such as path, alias's, prompt etc. You can add to this file to run scripts or set parameters automatically when you log in using the CLI. | For CS407 fw598 when you log in to the Comand Line Interface (via either SSH or Telnet) as a user (usually root) the NAS creates a ptty ash shell for you and drops you into that users "home" directory as defined in the file "/etc/passwd". It then runs the file "/etc/profile". If the home directory of the logging in user contains a file ".profile" (synology use one for the user "root" it is "/root/.profile") this is read and also actioned setting environment variables, such as path, alias's, prompt etc. You can add to this file to run scripts or set parameters automatically when you log in using the CLI. | ||