Skip to content

Service file to fix symlink for wpa_supplicant.conf - #337

Merged
guysoft merged 1 commit into
guysoft:develfrom
foosel:fix/issue336
Apr 5, 2017
Merged

Service file to fix symlink for wpa_supplicant.conf#337
guysoft merged 1 commit into
guysoft:develfrom
foosel:fix/issue336

Conversation

@foosel

@foosel foosel commented Apr 5, 2017

Copy link
Copy Markdown
Collaborator

Included script will make sure that if wpa_supplicant.conf is no
longer a symlink but it and /boot/octopi-wpa-supplicant.txt exist,
the selected wifi country will be extracted and written to
/boot/octopi-wpa-supplicant.txt and then the symlink will be
recreated. If wpa_supplicant.conf is completely gone, only the
symlink will be recreated. Nothing will be done if
/boot/octopi-wpa-supplicant.txt does not exist.

The service file ensures that this check is done on every boot,
after the local file system becomes available but before the
networking gets initialized.

This should solve #336

Note that this requires systemd (Debian Jessie) - since current
Raspbian starts SysV init scripts only after networking has
started to initialized, it was impossible for me to create a
SysV init script that fixes the symlink prior to network
initialization.

Included script will make sure that if wpa_supplicant.conf is no
longer a symlink but it and /boot/octopi-wpa-supplicant.txt exist,
the selected wifi country will be extracted and written to
/boot/octopi-wpa-supplicant.txt and then the symlink will be
recreated. If wpa_supplicant.conf is completely gone, only the
symlink will be recreated. Nothing will be done if
/boot/octopi-wpa-supplicant.txt does not exist.

The service file ensures that this check is done on every boot,
after the local file system becomes available but before the
networking gets initialized.

This should solve guysoft#336

Note that this requires systemd (Debian Jessie) - since current
Raspbian starts SysV init scripts only after networking has
started to initialized, it was impossible for me to create a
SysV init script that fixes the symlink prior to network
initialization.
@guysoft
guysoft merged commit 98169f7 into guysoft:devel Apr 5, 2017
@foosel foosel mentioned this pull request Apr 18, 2017
@guysoft guysoft mentioned this pull request Jun 18, 2017
guysoft added a commit that referenced this pull request Mar 1, 2018
guysoft added a commit to guysoft/CustomPiOS that referenced this pull request Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants